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 | 8 |
9 # This tests an interface that is specific to Mac OS X and/or Mach and | 9 # This tests an interface that is specific to Mac OS X and/or Mach and |
10 # that is only implemented for x86-32. | 10 # that is only implemented for x86-32. |
11 if not env.Bit('host_mac') or not env.Bit('build_x86_32'): | 11 if not env.Bit('host_mac') or not env.Bit('build_x86_32'): |
12 Return() | 12 Return() |
13 | 13 |
14 # These tests use nexes built by other tests. Nexes do not get staged in | 14 # These tests use nexes built by other tests. Nexes do not get staged in |
15 # pexe mode, so only run this test in nonpexe mode. | 15 # pexe mode, so only run this test in nonpexe mode. |
16 if env.Bit('pnacl_generate_pexe'): | 16 if env.Bit('pnacl_generate_pexe'): |
17 Return() | 17 Return() |
18 | 18 |
19 if 'TRUSTED_ENV' not in env: | 19 if 'TRUSTED_ENV' not in env: |
20 Return() | 20 Return() |
21 trusted_env = env['TRUSTED_ENV'] | 21 trusted_env = env['TRUSTED_ENV'] |
22 | 22 |
23 # This duplicates the library list in src/trusted/service_runtime/build.scons. | 23 # This duplicates the library list in src/trusted/service_runtime/build.scons. |
24 # We would not have to do this if we could get Scons to track dependencies | 24 # We would not have to do this if we could get Scons to track dependencies |
25 # between libraries. | 25 # between libraries. |
26 VALIDATOR_LIBS = [] | |
27 if trusted_env.Bit('target_x86'): | |
28 VALIDATOR_LIBS += [trusted_env.NaClTargetArchSuffix('ncvalidate')] | |
29 elif trusted_env.Bit('target_arm'): | |
30 VALIDATOR_LIBS += ['ncvalidate_arm_v2'] | |
31 | |
32 runner = trusted_env.ComponentProgram( | 26 runner = trusted_env.ComponentProgram( |
33 'mach_crash_forwarding_test', ['mach_crash_forwarding_test.c'], | 27 'mach_crash_forwarding_test', ['mach_crash_forwarding_test.c'], |
34 EXTRA_LIBS=['sel', | 28 EXTRA_LIBS=['sel', |
35 'sel_debug_dummy', | 29 'sel_debug_dummy', |
36 'manifest_proxy', | 30 'manifest_proxy', |
37 'simple_service', | 31 'simple_service', |
38 'thread_interface', | 32 'thread_interface', |
39 'gio_wrapped_desc', | 33 'gio_wrapped_desc', |
40 'nonnacl_srpc', | 34 'nonnacl_srpc', |
41 'nrd_xfer', | 35 'nrd_xfer', |
42 'nacl_perf_counter', | 36 'nacl_perf_counter', |
43 'nacl_base', | 37 'nacl_base', |
44 'imc', | 38 'imc', |
45 'container', | 39 'container', |
46 'nacl_fault_inject', | 40 'nacl_fault_inject', |
47 'nacl_interval', | 41 'nacl_interval', |
48 'platform', | 42 'platform', |
49 'platform_qual_lib', | 43 'platform_qual_lib', |
50 'gio', | 44 'gio', |
51 ] + VALIDATOR_LIBS) | 45 ]) |
52 | 46 |
53 untrusted_caught_nexe = env.File('${STAGING_DIR}/exception_test${PROGSUFFIX}') | 47 untrusted_caught_nexe = env.File('${STAGING_DIR}/exception_test${PROGSUFFIX}') |
54 untrusted_crash_nexe = env.File('${STAGING_DIR}/crash_test${PROGSUFFIX}') | 48 untrusted_crash_nexe = env.File('${STAGING_DIR}/crash_test${PROGSUFFIX}') |
55 trusted_crash_nexe = env.File('${STAGING_DIR}/crash_in_syscall${PROGSUFFIX}') | 49 trusted_crash_nexe = env.File('${STAGING_DIR}/crash_in_syscall${PROGSUFFIX}') |
56 is_broken = not env.Bit('nacl_static_link') | 50 is_broken = not env.Bit('nacl_static_link') |
57 | 51 |
58 test_suites = ['small_tests', 'exception_tests', 'nonpexe_tests'] | 52 test_suites = ['small_tests', 'exception_tests', 'nonpexe_tests'] |
59 | 53 |
60 node = env.CommandTest('mach_forward_untrusted_crash_test.out', | 54 node = env.CommandTest('mach_forward_untrusted_crash_test.out', |
61 [runner, 'untrusted', untrusted_crash_nexe], | 55 [runner, 'untrusted', untrusted_crash_nexe], |
(...skipping 21 matching lines...) Expand all Loading... |
83 declares_exit_status=True) | 77 declares_exit_status=True) |
84 env.AddNodeToTestSuite(node, test_suites, | 78 env.AddNodeToTestSuite(node, test_suites, |
85 'run_mach_unforwarded_trusted_crash_test', | 79 'run_mach_unforwarded_trusted_crash_test', |
86 is_broken=is_broken) | 80 is_broken=is_broken) |
87 | 81 |
88 node = env.CommandTest('mach_forward_early_trusted_crash_test.out', | 82 node = env.CommandTest('mach_forward_early_trusted_crash_test.out', |
89 [runner, 'early_trusted'], declares_exit_status=True) | 83 [runner, 'early_trusted'], declares_exit_status=True) |
90 env.AddNodeToTestSuite(node, test_suites, | 84 env.AddNodeToTestSuite(node, test_suites, |
91 'run_mach_forward_early_trusted_crash_test', | 85 'run_mach_forward_early_trusted_crash_test', |
92 is_broken=is_broken) | 86 is_broken=is_broken) |
OLD | NEW |