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. | |
24 # We would not have to do this if we could get Scons to track dependencies | |
25 # between libraries. | |
26 runner = trusted_env.ComponentProgram( | 23 runner = trusted_env.ComponentProgram( |
27 'crash_filter_test', ['crash_filter_test.c'], | 24 'crash_filter_test', ['crash_filter_test.c'], |
28 EXTRA_LIBS=['sel', | 25 EXTRA_LIBS=['sel', 'sel_debug_dummy']) |
29 'sel_debug_dummy', | |
30 'manifest_proxy', | |
31 'simple_service', | |
32 'thread_interface', | |
33 'gio_wrapped_desc', | |
34 'nonnacl_srpc', | |
35 'nrd_xfer', | |
36 'nacl_perf_counter', | |
37 'nacl_base', | |
38 'imc', | |
39 'container', | |
40 'nacl_fault_inject', | |
41 'nacl_interval', | |
42 'platform', | |
43 'platform_qual_lib', | |
44 'gio', | |
45 ]) | |
46 | 26 |
47 untrusted_crash_nexe = env.File('${STAGING_DIR}/crash_test${PROGSUFFIX}') | 27 untrusted_crash_nexe = env.File('${STAGING_DIR}/crash_test${PROGSUFFIX}') |
48 trusted_crash_nexe = env.File('${STAGING_DIR}/crash_in_syscall${PROGSUFFIX}') | 28 trusted_crash_nexe = env.File('${STAGING_DIR}/crash_in_syscall${PROGSUFFIX}') |
49 is_broken = not env.Bit('nacl_static_link') | 29 is_broken = not env.Bit('nacl_static_link') |
50 | 30 |
51 test_suites = ['small_tests', 'exception_tests', 'nonpexe_tests'] | 31 test_suites = ['small_tests', 'exception_tests', 'nonpexe_tests'] |
52 | 32 |
53 node = env.CommandTest('mach_filter_untrusted_crash_test.out', | 33 node = env.CommandTest('mach_filter_untrusted_crash_test.out', |
54 [runner, 'untrusted', untrusted_crash_nexe], | 34 [runner, 'untrusted', untrusted_crash_nexe], |
55 declares_exit_status=True) | 35 declares_exit_status=True) |
56 env.AddNodeToTestSuite(node, test_suites, | 36 env.AddNodeToTestSuite(node, test_suites, |
57 'run_mach_filter_untrusted_crash_test', | 37 'run_mach_filter_untrusted_crash_test', |
58 is_broken=is_broken) | 38 is_broken=is_broken) |
59 | 39 |
60 node = env.CommandTest('mach_filter_trusted_crash_test.out', | 40 node = env.CommandTest('mach_filter_trusted_crash_test.out', |
61 [runner, 'trusted', trusted_crash_nexe], | 41 [runner, 'trusted', trusted_crash_nexe], |
62 declares_exit_status=True) | 42 declares_exit_status=True) |
63 env.AddNodeToTestSuite(node, test_suites, | 43 env.AddNodeToTestSuite(node, test_suites, |
64 'run_mach_filter_trusted_crash_test', | 44 'run_mach_filter_trusted_crash_test', |
65 is_broken=is_broken) | 45 is_broken=is_broken) |
66 | 46 |
67 node = env.CommandTest('mach_filter_early_trusted_crash_test.out', | 47 node = env.CommandTest('mach_filter_early_trusted_crash_test.out', |
68 [runner, 'early_trusted'], declares_exit_status=True) | 48 [runner, 'early_trusted'], declares_exit_status=True) |
69 env.AddNodeToTestSuite(node, test_suites, | 49 env.AddNodeToTestSuite(node, test_suites, |
70 'run_mach_filter_early_trusted_crash_test', | 50 'run_mach_filter_early_trusted_crash_test', |
71 is_broken=is_broken) | 51 is_broken=is_broken) |
OLD | NEW |