OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2012 The Native Client Authors. All rights reserved. | 2 # Copyright 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 Import('env') | 6 Import('env') |
7 | 7 |
8 # step_test_guest.nexe fails to link when Valgrind is enabled because | 8 # step_test_guest.nexe fails to link when Valgrind is enabled because |
9 # of a problem with the TLS ".tbss" section. | 9 # of a problem with the TLS ".tbss" section. |
10 if env.IsRunningUnderValgrind(): | 10 if env.IsRunningUnderValgrind(): |
11 Return() | 11 Return() |
12 | 12 |
13 if 'TRUSTED_ENV' not in env: | 13 if 'TRUSTED_ENV' not in env: |
14 Return() | 14 Return() |
15 trusted_env = env['TRUSTED_ENV'] | 15 trusted_env = env['TRUSTED_ENV'] |
16 | 16 |
17 if not env.AllowInlineAssembly(): | 17 if not env.AllowInlineAssembly(): |
18 Return() | 18 Return() |
19 | 19 |
20 if not (env.Bit('build_x86') or env.Bit('build_arm')): | 20 if not (env.Bit('build_x86') or env.Bit('build_arm')): |
21 Return() | 21 Return() |
22 # This test uses POSIX signal handling so does not build on Windows. | 22 # This test uses POSIX signal handling so does not build on Windows. |
23 if env.Bit('host_windows'): | 23 if env.Bit('host_windows'): |
24 Return() | 24 Return() |
25 # This test expects that a signal handler will be able to return to | 25 # This test expects that a signal handler will be able to return to |
26 # untrusted code, and so it does not work on Mac OS X which does not | 26 # untrusted code, and so it does not work on Mac OS X which does not |
27 # restore %cs to its saved value on return from a signal handler. | 27 # restore %cs to its saved value on return from a signal handler. |
28 if env.Bit('host_mac'): | 28 if env.Bit('host_mac'): |
29 Return() | 29 Return() |
30 # nacl-clang's integrated assembler expands "naclcall" to a sequence which | |
31 # separates the push of the return address from the jump, and so breaks the | |
32 # test's expectations for the stack pointer. | |
33 # TODO(dschuff): re-enable this test after we switch to gas with nacl-clang | |
34 # https://code.google.com/p/nativeclient/issues/detail?id=3966 | |
35 if env.Bit('nacl_clang'): | |
36 Return() | |
37 | 30 |
38 if env.Bit('build_x86'): | 31 if env.Bit('build_x86'): |
39 step_test_guest = env.ComponentProgram( | 32 step_test_guest = env.ComponentProgram( |
40 'step_test_guest', ['step_test_guest.c'], | 33 'step_test_guest', ['step_test_guest.c'], |
41 EXTRA_LIBS=['${NONIRT_LIBS}'], | 34 EXTRA_LIBS=['${NONIRT_LIBS}'], |
42 EXTRA_LINKFLAGS=['-nostdlib']) | 35 EXTRA_LINKFLAGS=['-nostdlib']) |
43 | 36 |
44 step_test_host = trusted_env.ComponentProgram( | 37 step_test_host = trusted_env.ComponentProgram( |
45 'step_test_host', ['step_test_host.c'], EXTRA_LIBS=['sel']) | 38 'step_test_host', ['step_test_host.c'], EXTRA_LIBS=['sel']) |
46 | 39 |
(...skipping 19 matching lines...) Expand all Loading... |
66 regs_step_test_host = trusted_env.ComponentProgram( | 59 regs_step_test_host = trusted_env.ComponentProgram( |
67 'regs_step_test_host', ['regs_step_test_host.c'], | 60 'regs_step_test_host', ['regs_step_test_host.c'], |
68 EXTRA_LIBS=['sel', 'test_common']) | 61 EXTRA_LIBS=['sel', 'test_common']) |
69 | 62 |
70 node = env.CommandTest( | 63 node = env.CommandTest( |
71 'signal_handler_regs_single_step.out', | 64 'signal_handler_regs_single_step.out', |
72 env.AddBootstrap(regs_step_test_host, [regs_step_test_guest])) | 65 env.AddBootstrap(regs_step_test_host, [regs_step_test_guest])) |
73 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'], | 66 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'], |
74 'run_signal_handler_regs_single_step_test', | 67 'run_signal_handler_regs_single_step_test', |
75 is_broken=not env.Bit('nacl_static_link')) | 68 is_broken=not env.Bit('nacl_static_link')) |
OLD | NEW |