@@ -13,15 +13,20 @@ add_dependencies(ret0 not)
13
13
llvm_test_run (EXECUTABLE "$<TARGET_FILE:not>" "$<TARGET_FILE:not>" "$<TARGET_FILE:ret0>" )
14
14
llvm_add_test_for_target (ret0 )
15
15
16
- # Check that expected crashes are handled correctly.
17
- llvm_test_executable_no_test (abrt abort.c )
18
- add_dependencies (abrt not )
19
- llvm_test_run (EXECUTABLE "$<TARGET_FILE:not>" "--crash" "$<TARGET_FILE:abrt>" )
20
- llvm_add_test_for_target (abrt )
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 ))
20
+ # Check that expected crashes are handled correctly.
21
+ llvm_test_executable_no_test (abrt abort.c )
22
+ add_dependencies (abrt not )
23
+ llvm_test_run (EXECUTABLE "$<TARGET_FILE:not>" "--crash" "$<TARGET_FILE:abrt>" )
24
+ llvm_add_test_for_target (abrt )
21
25
22
- # Check that not passes environment variables to the called executable.
23
- find_package (Python COMPONENTS Interpreter )
24
- llvm_test_executable_no_test (check_env check_env.c )
25
- add_dependencies (check_env not )
26
- llvm_test_run (EXECUTABLE ${Python_EXECUTABLE} "%b/test/test_not.py" "$<TARGET_FILE:not>" "$<TARGET_FILE:check_env>" )
27
- llvm_add_test_For_target (check_env )
26
+ # Check that not passes environment variables to the called executable.
27
+ find_package (Python COMPONENTS Interpreter )
28
+ llvm_test_executable_no_test (check_env check_env.c )
29
+ add_dependencies (check_env not )
30
+ llvm_test_run (EXECUTABLE ${Python_EXECUTABLE} "%b/test/test_not.py" "$<TARGET_FILE:not>" "$<TARGET_FILE:check_env>" )
31
+ llvm_add_test_For_target (check_env )
32
+ endif ()
0 commit comments