1- # Copy these files to the build directory so that the tests can be run even
2- # without the source directory.
3- configure_file (test_not.py test_not.py
4- COPYONLY )
5-
61llvm_test_executable_no_test (ret1 ret1.c )
72add_dependencies (ret1 not )
83llvm_test_run (EXECUTABLE "$<TARGET_FILE :not >" "$<TARGET_FILE :ret1 >" )
@@ -13,25 +8,15 @@ add_dependencies(ret0 not)
138llvm_test_run (EXECUTABLE "$<TARGET_FILE :not >" "$<TARGET_FILE :not >" "$<TARGET_FILE :ret0 >" )
149llvm_add_test_for_target (ret0 )
1510
16- if (TEST_SUITE_USER_MODE_EMULATION AND TEST_SUITE_RUN_UNDER)
17- # Check that expected crashes are handled correctly under user-mode emulation.
18- llvm_test_executable_no_test (abrt abort.c )
19- add_dependencies (abrt not -spawning-emulator )
20- llvm_test_run (EXECUTABLE "$<TARGET_FILE :not -spawning -emulator >" "--crash" "$<TARGET_FILE :abrt >" )
21- llvm_add_test_for_target (abrt )
22- else ()
23- # Check that expected crashes are handled correctly.
24- llvm_test_executable_no_test (abrt abort.c )
25- add_dependencies (abrt not )
26- llvm_test_run (EXECUTABLE "$<TARGET_FILE :not >" "--crash" "$<TARGET_FILE :abrt >" )
27- llvm_add_test_for_target (abrt )
11+ # Check that expected crashes are handled correctly under user-mode emulation.
12+ llvm_test_executable_no_test (abrt abort.c )
13+ add_dependencies (abrt ${NOT_TOOL} )
14+ llvm_test_run (EXECUTABLE "$<TARGET_FILE :${NOT_TOOL} >" "--crash" "$<TARGET_FILE :abrt >" )
15+ llvm_add_test_for_target (abrt )
2816
29- # Check that not passes environment variables to the called executable.
30- # This test is disabled in case of user-mode emulation because it would otherwise run the
31- # host python interpreter under the target emulator.
32- find_package (Python COMPONENTS Interpreter )
33- llvm_test_executable_no_test (check_env check_env.c )
34- add_dependencies (check_env not )
35- llvm_test_run (EXECUTABLE ${Python_EXECUTABLE} "%b/test/test_not.py" "$<TARGET_FILE :not >" "$<TARGET_FILE :check_env >" )
36- llvm_add_test_For_target (check_env )
37- endif ()
17+ # Check that not passes environment variables to the called executable.
18+ llvm_test_executable_no_test (test_not test_not.cpp )
19+ llvm_test_executable_no_test (check_env check_env.c )
20+ add_dependencies (check_env not test_not )
21+ llvm_test_run (EXECUTABLE ${Python_EXECUTABLE} "$<TARGET_FILE :test_not >" "$<TARGET_FILE :${NOT_TOOL} >" "$<TARGET_FILE :check_env >" )
22+ llvm_add_test_For_target (check_env )
0 commit comments