Skip to content

Commit

Permalink
change script
Browse files Browse the repository at this point in the history
  • Loading branch information
ladisgin committed Feb 21, 2024
1 parent 764a175 commit d15dc1f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/run_tests_with_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This script builds executable file using initial bitcode file and artifacts produced by KLEE.
# To run the script provide all the arguments you want to pass to clang for building executable.
#
# NOTE: First argument is path to clang compiler
# NOTE: First argument is path to compiler
# NOTE: Pre-last argument should be a path to KLEE output directory which contains redefinitions.txt and externals.ll.
# NOTE: Last argument is path to initial bitcode.
#
Expand All @@ -22,6 +22,11 @@
object_file = f'{filename}.o'
sp.run(f'llc {bitcode} -filetype=obj -o {object_file}', shell=True)
sp.run(f'llvm-objcopy {object_file} --redefine-syms {klee_out_dir}/redefinitions.txt', shell=True)

externals = 'externals.o'
sp.run(f'llc {klee_out_dir}/externals.ll -filetype=obj -o {externals}', shell=True)

clang_args = ' '.join(sys.argv[1:len(sys.argv) - 2])
print(f'{clang_args} {klee_out_dir}/externals.ll {object_file}')
sp.run(f'{clang_args} {klee_out_dir}/externals.ll {object_file}', shell=True)
command = f'{clang_args} {externals} {object_file}'
print(command)
sp.run(command, shell=True)

0 comments on commit d15dc1f

Please sign in to comment.