@@ -13,26 +13,25 @@ add_dependencies(ret0 not)
1313llvm_test_run (EXECUTABLE "$<TARGET_FILE :not >" "$<TARGET_FILE :not >" "$<TARGET_FILE :ret0 >" )
1414llvm_add_test_for_target (ret0 )
1515
16- # These test will always fail under user-mode emulation because 'not'
17- # spawns a subprocess outside the emulator and the check_env test
18- # runs the host python interpreter under the emulator for the target.
19- if (NOT (TEST_SUITE_USER_MODE_EMULATION AND TEST_SUITE_RUN_UNDER))
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 ()
2023 # Check that expected crashes are handled correctly.
2124 llvm_test_executable_no_test (abrt abort.c )
2225 add_dependencies (abrt not )
2326 llvm_test_run (EXECUTABLE "$<TARGET_FILE :not >" "--crash" "$<TARGET_FILE :abrt >" )
2427 llvm_add_test_for_target (abrt )
2528
2629 # 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.
2732 find_package (Python COMPONENTS Interpreter )
2833 llvm_test_executable_no_test (check_env check_env.c )
2934 add_dependencies (check_env not )
3035 llvm_test_run (EXECUTABLE ${Python_EXECUTABLE} "%b/test/test_not.py" "$<TARGET_FILE :not >" "$<TARGET_FILE :check_env >" )
3136 llvm_add_test_For_target (check_env )
32- else ()
33- # Check that expected crashes are handled correctly under user-mode emulation.
34- llvm_test_executable_no_test (abrt abort.c )
35- add_dependencies (abrt not -spawning-emulator )
36- llvm_test_run (EXECUTABLE "$<TARGET_FILE :not -spawning -emulator >" "--crash" "$<TARGET_FILE :abrt >" )
37- llvm_add_test_for_target (abrt )
3837endif ()
0 commit comments