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 test_prog = env.ComponentProgram('test_guest', ['test_guest.c'], | 9 test_prog = env.ComponentProgram('test_guest', ['test_guest.c'], |
10 EXTRA_LINKFLAGS=['-nostdlib']) | 10 EXTRA_LINKFLAGS=['-nostdlib']) |
11 | 11 |
12 # If we are generating a pexe, translate it first | 12 # If we are generating a pexe, translate it first |
13 if env.Bit('pnacl_generate_pexe'): | 13 if env.Bit('pnacl_generate_pexe'): |
14 env.Replace(TRANSLATEFLAGS=['-nostdlib']) | 14 env.Replace(TRANSLATEFLAGS=['-nostdlib']) |
15 test_prog = env.GetTranslatedNexe(test_prog) | 15 test_prog = env.GetTranslatedNexe(test_prog) |
16 | 16 |
17 if not env.Bit('host_windows'): | 17 if not env.Bit('host_windows'): |
18 # This test is specifically for Windows: it checks how NaCl | 18 # This test is specifically for Windows: it checks how NaCl |
19 # interacts with a Windows API (SetUnhandledExceptionFilter()). | 19 # interacts with a Windows API (SetUnhandledExceptionFilter()). |
20 Return() | 20 Return() |
21 | 21 |
22 if 'TRUSTED_ENV' not in env: | 22 if 'TRUSTED_ENV' not in env: |
23 Return() | 23 Return() |
24 trusted_env = env['TRUSTED_ENV'] | 24 trusted_env = env['TRUSTED_ENV'] |
25 | 25 |
26 # This duplicates the library list in src/trusted/service_runtime/build.scons. | 26 # This duplicates the library list in src/trusted/service_runtime/build.scons. |
27 # We would not have to do this if we could get Scons to track dependencies | 27 # We would not have to do this if we could get Scons to track dependencies |
28 # between libraries. | 28 # between libraries. |
29 VALIDATOR_LIBS = [] | |
30 if trusted_env.Bit('target_x86'): | |
31 VALIDATOR_LIBS += [trusted_env.NaClTargetArchSuffix('ncvalidate')] | |
32 elif trusted_env.Bit('target_arm'): | |
33 VALIDATOR_LIBS += ['ncvalidate_arm_v2'] | |
34 | |
35 runner = trusted_env.ComponentProgram( | 29 runner = trusted_env.ComponentProgram( |
36 'test_host', ['test_host.c'], | 30 'test_host', ['test_host.c'], |
37 EXTRA_LIBS=['sel', | 31 EXTRA_LIBS=['sel', |
38 'sel_debug_dummy', | 32 'sel_debug_dummy', |
39 'manifest_proxy', | 33 'manifest_proxy', |
40 'simple_service', | 34 'simple_service', |
41 'thread_interface', | 35 'thread_interface', |
42 'gio_wrapped_desc', | 36 'gio_wrapped_desc', |
43 'nonnacl_srpc', | 37 'nonnacl_srpc', |
44 'nrd_xfer', | 38 'nrd_xfer', |
45 'nacl_perf_counter', | 39 'nacl_perf_counter', |
46 'nacl_base', | 40 'nacl_base', |
47 'imc', | 41 'imc', |
48 'container', | 42 'container', |
49 'nacl_fault_inject', | 43 'nacl_fault_inject', |
50 'nacl_interval', | 44 'nacl_interval', |
51 'platform', | 45 'platform', |
52 'platform_qual_lib', | 46 'platform_qual_lib', |
53 'gio', | 47 'gio', |
54 'dbghelp.lib', # Windows library | 48 'dbghelp.lib', # Windows library |
55 ] + VALIDATOR_LIBS) | 49 ]) |
56 | 50 |
57 node = env.CommandTest( | 51 node = env.CommandTest( |
58 'windows_crash_in_syscall_test.out', [runner, test_prog], | 52 'windows_crash_in_syscall_test.out', [runner, test_prog], |
59 declares_exit_status=True) | 53 declares_exit_status=True) |
60 env.AddNodeToTestSuite(node, ['small_tests'], | 54 env.AddNodeToTestSuite(node, ['small_tests'], |
61 'run_windows_crash_in_syscall_test', | 55 'run_windows_crash_in_syscall_test', |
62 is_broken=not env.Bit('nacl_static_link')) | 56 is_broken=not env.Bit('nacl_static_link')) |
OLD | NEW |