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 # valgrind has problems with minimal_test_guest | 8 # valgrind has problems with minimal_test_guest |
9 if env.IsRunningUnderValgrind(): | 9 if env.IsRunningUnderValgrind(): |
10 Return() | 10 Return() |
11 | 11 |
12 # This test case tests an experimental profile of NaCl. If you make a | 12 # This test case tests an experimental profile of NaCl. If you make a |
13 # change which breaks this test which is difficult to fix, you can | 13 # change which breaks this test which is difficult to fix, you can |
14 # disable the test, but please CC mseaborn,krasin. | 14 # disable the test, but please CC mseaborn,krasin. |
15 | 15 |
16 if 'TRUSTED_ENV' not in env: | 16 if 'TRUSTED_ENV' not in env: |
17 Return() | 17 Return() |
18 trusted_env = env['TRUSTED_ENV'] | 18 trusted_env = env['TRUSTED_ENV'] |
19 | 19 |
20 # This duplicates the library list in src/trusted/service_runtime/build.scons. | 20 # This duplicates the library list in src/trusted/service_runtime/build.scons. |
21 # We would not have to do this if we could get Scons to track dependencies | 21 # We would not have to do this if we could get Scons to track dependencies |
22 # between libraries. | 22 # between libraries. |
23 VALIDATOR_LIBS = [] | |
24 if trusted_env.Bit('target_x86'): | |
25 VALIDATOR_LIBS += [trusted_env.NaClTargetArchSuffix('ncvalidate')] | |
26 elif trusted_env.Bit('target_arm'): | |
27 VALIDATOR_LIBS += ['ncvalidate_arm_v2'] | |
28 | |
29 runner = trusted_env.ComponentProgram( | 23 runner = trusted_env.ComponentProgram( |
30 'minimal_test_host', ['minimal_test_host.c'], | 24 'minimal_test_host', ['minimal_test_host.c'], |
31 EXTRA_LIBS=['sel', | 25 EXTRA_LIBS=['sel', |
32 'sel_debug_dummy', | 26 'sel_debug_dummy', |
33 'manifest_proxy', | 27 'manifest_proxy', |
34 'simple_service', | 28 'simple_service', |
35 'thread_interface', | 29 'thread_interface', |
36 'gio_wrapped_desc', | 30 'gio_wrapped_desc', |
37 'nonnacl_srpc', | 31 'nonnacl_srpc', |
38 'nrd_xfer', | 32 'nrd_xfer', |
39 'nacl_perf_counter', | 33 'nacl_perf_counter', |
40 'nacl_base', | 34 'nacl_base', |
41 'imc', | 35 'imc', |
42 'container', | 36 'container', |
43 'nacl_fault_inject', | 37 'nacl_fault_inject', |
44 'nacl_interval', | 38 'nacl_interval', |
45 'platform', | 39 'platform', |
46 'platform_qual_lib', | 40 'platform_qual_lib', |
47 'gio', | 41 'gio', |
48 ] + VALIDATOR_LIBS) | 42 ]) |
49 | 43 |
50 | 44 |
51 test_prog = env.ComponentProgram( | 45 test_prog = env.ComponentProgram( |
52 'minimal_test_guest', | 46 'minimal_test_guest', |
53 ['minimal_test_guest.c'], | 47 ['minimal_test_guest.c'], |
54 EXTRA_LINKFLAGS=['-nostdlib']) | 48 EXTRA_LINKFLAGS=['-nostdlib']) |
55 | 49 |
56 if env.Bit('pnacl_generate_pexe'): | 50 if env.Bit('pnacl_generate_pexe'): |
57 env.Replace(TRANSLATEFLAGS=['-nostdlib']) | 51 env.Replace(TRANSLATEFLAGS=['-nostdlib']) |
58 test_prog = env.GetTranslatedNexe(test_prog) | 52 test_prog = env.GetTranslatedNexe(test_prog) |
59 | 53 |
60 test_command = [runner, test_prog] | 54 test_command = [runner, test_prog] |
61 bootstrap, _ = env.GetBootstrap() | 55 bootstrap, _ = env.GetBootstrap() |
62 if bootstrap is not None: | 56 if bootstrap is not None: |
63 test_command = [bootstrap] + test_command | 57 test_command = [bootstrap] + test_command |
64 | 58 |
65 node = env.CommandTest('minimal_test.out', test_command, | 59 node = env.CommandTest('minimal_test.out', test_command, |
66 stdout_golden=env.File('minimal_test.stdout')) | 60 stdout_golden=env.File('minimal_test.stdout')) |
67 env.AddNodeToTestSuite(node, ['small_tests'], 'run_minnacl_test', | 61 env.AddNodeToTestSuite(node, ['small_tests'], 'run_minnacl_test', |
68 is_broken=not env.Bit('nacl_static_link')) | 62 is_broken=not env.Bit('nacl_static_link')) |
OLD | NEW |