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 # This test case tests an experimental use case for NaCl. If you make | 8 # This test case tests an experimental use case for NaCl. If you make |
9 # a change which breaks this test which is difficult to fix, you can | 9 # a change which breaks this test which is difficult to fix, you can |
10 # disable the test, but please CC mseaborn,krasin. | 10 # disable the test, but please CC mseaborn,krasin. |
11 | 11 |
12 if 'TRUSTED_ENV' not in env: | 12 if 'TRUSTED_ENV' not in env: |
13 Return() | 13 Return() |
14 trusted_env = env['TRUSTED_ENV'] | 14 trusted_env = env['TRUSTED_ENV'] |
15 | 15 |
16 runner = trusted_env.ComponentProgram( | 16 runner = trusted_env.ComponentProgram( |
17 'multidomain_test_host', ['multidomain_test_host.c'], | 17 'multidomain_test_host', ['multidomain_test_host.c'], |
18 EXTRA_LIBS=['sel']) | 18 EXTRA_LIBS=['sel']) |
19 | 19 |
20 test_prog = env.ComponentProgram( | 20 test_prog = env.ComponentProgram( |
21 'multidomain_test_guest', ['multidomain_test_guest.c'], | 21 'multidomain_test_guest', ['multidomain_test_guest.c'], |
22 EXTRA_LIBS=['imc_syscalls', '${NONIRT_LIBS}']) | 22 EXTRA_LIBS=['imc_syscalls', '${NONIRT_LIBS}']) |
23 | 23 |
24 # If we are generating a pexe, translate it first | 24 # If we are generating a pexe, translate it first |
25 if env.ShouldTranslateToNexe(test_prog): | 25 test_prog = env.GetTranslatedNexe(test_prog) |
26 test_prog = env.GetTranslatedNexe(test_prog) | |
27 | 26 |
28 node = env.CommandTest('multidomain_test.out', [runner, test_prog], | 27 node = env.CommandTest('multidomain_test.out', [runner, test_prog], |
29 # Increase verbosity to get more information in | 28 # Increase verbosity to get more information in |
30 # the event of a crash. | 29 # the event of a crash. |
31 osenv='NACLVERBOSITY=4', | 30 osenv='NACLVERBOSITY=4', |
32 stdout_golden=env.File('multidomain_test.stdout')) | 31 stdout_golden=env.File('multidomain_test.stdout')) |
33 | 32 |
34 # This test does not work everywhere: | 33 # This test does not work everywhere: |
35 # * NaCl's ARM sandbox does not support multiple sandboxes per | 34 # * NaCl's ARM sandbox does not support multiple sandboxes per |
36 # process, so this test is disabled for ARM. | 35 # process, so this test is disabled for ARM. |
37 # * multidomain_test_host assumes it is given a statically linked | 36 # * multidomain_test_host assumes it is given a statically linked |
38 # executable. Furthermore, statically-linked nacl-glibc does not | 37 # executable. Furthermore, statically-linked nacl-glibc does not |
39 # work here because of validation failures which require stubout | 38 # work here because of validation failures which require stubout |
40 # mode. | 39 # mode. |
41 is_broken = env.Bit('build_arm') or env.Bit('nacl_glibc') | 40 is_broken = env.Bit('build_arm') or env.Bit('nacl_glibc') |
42 | 41 |
43 env.AddNodeToTestSuite(node, ['small_tests'], 'run_multidomain_test', | 42 env.AddNodeToTestSuite(node, ['small_tests'], 'run_multidomain_test', |
44 is_broken=is_broken) | 43 is_broken=is_broken) |
OLD | NEW |