Skip to content

Commit 220a92f

Browse files
committed
some test fixes
1 parent 8112bc1 commit 220a92f

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}")
1515
set(LLVMCC "${LLVMCC} -I${CMAKE_SOURCE_DIR}/include")
1616
set(LLVMCXX "${LLVMCXX} -I${CMAKE_SOURCE_DIR}/include")
1717
set(NATIVE_CC "${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -I ${CMAKE_SOURCE_DIR}/include")
18+
set(NATIVE_OBJCOPY "${CMAKE_OBJCOPY}")
1819
set(NATIVE_CXX "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -I ${CMAKE_SOURCE_DIR}/include")
1920
set(TARGET_TRIPLE "${TARGET_TRIPLE}")
2021

test/Replay/libkleeruntest/replay_mocks.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
// REQUIRES: geq-llvm-11.0
2+
// REQUIRES: not-darwin
23
// RUN: %clang %s -emit-llvm -g %O0opt -c -o %t.bc
34
// RUN: rm -rf %t.klee-out
45
// RUN: %klee --output-dir=%t.klee-out --external-calls=all --mock-strategy=naive %t.bc
5-
66
// RUN: %clang -c %t.bc -o %t.o
7-
// RUN: %llvmobjcopy --redefine-syms %t.klee-out/redefinitions.txt %t.o
8-
// RUN: %clang -o %t.klee-out/a.out %libkleeruntest %t.klee-out/externals.ll %t.o
7+
// RUN: %llc %t.klee-out/externals.ll -filetype=obj -o %t_externals.o
8+
// RUN: %objcopy --redefine-syms %t.klee-out/redefinitions.txt %t.o
9+
// RUN: %cc -no-pie %t_externals.o %t.o %libkleeruntest -Wl,-rpath %libkleeruntestdir -o %t_runner
910
// RUN: test -f %t.klee-out/test000001.ktest
10-
// RUN: env KTEST_FILE=%t.klee-out/test000001.ktest %t.klee-out/a.out
11+
// RUN: env KTEST_FILE=%t.klee-out/test000001.ktest %t_runner
1112

1213
extern int variable;
1314

test/lit.cfg

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ if config.test_exec_root is None:
9090

9191

9292
# Add substitutions from lit.site.cfg
93-
subs = [ 'clangxx', 'clang', 'cc', 'cxx', 'O0opt', 'c_prefixes_8', 'c_prefixes_10', 'cpp_prefixes_10' ]
93+
subs = [ 'clangxx', 'clang', 'cc', 'objcopy', 'cxx', 'O0opt', 'c_prefixes_8', 'c_prefixes_10', 'cpp_prefixes_10' ]
9494
for name in subs:
9595
value = getattr(config, name, None)
9696
if value == None:
@@ -105,6 +105,12 @@ config.substitutions.append(
105105
config.substitutions.append(
106106
('%lli', os.path.join(llvm_tools_dir, 'lli'))
107107
)
108+
109+
# Add a substitution for llc.
110+
config.substitutions.append(
111+
('%llc', os.path.join(llvm_tools_dir, 'llc'))
112+
)
113+
108114
# Add a substitution for llvm-as
109115
config.substitutions.append(
110116
('%llvmas', os.path.join(llvm_tools_dir, 'llvm-as'))

test/lit.site.cfg.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ config.clang = "@LLVMCC@"
3535
config.clangxx = "@LLVMCXX@"
3636

3737
config.cc = "@NATIVE_CC@"
38+
config.objcopy = "@NATIVE_OBJCOPY@"
3839
config.cxx = "@NATIVE_CXX@"
3940

4041
# NOTE: any changes to compiler flags also have to be applied to

0 commit comments

Comments
 (0)