OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 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 # Use of "-nostdlib" means these tests produce statically-linked | 8 # Use of "-nostdlib" means these tests produce statically-linked |
9 # executables. This does not work with the test runner for | 9 # executables. This does not work with the test runner for |
10 # nacl-glibc, which always runs the executables via ld.so. However, | 10 # nacl-glibc, which always runs the executables via ld.so. However, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 src = 'barebones_' + basename + '.c' | 52 src = 'barebones_' + basename + '.c' |
53 nexe_name = 'barebones_' + basename | 53 nexe_name = 'barebones_' + basename |
54 out = 'barebones_' + basename + '.out' | 54 out = 'barebones_' + basename + '.out' |
55 test = 'run_barebones_' + basename + '_test' | 55 test = 'run_barebones_' + basename + '_test' |
56 test = 'run_barebones_' + basename + '_test' | 56 test = 'run_barebones_' + basename + '_test' |
57 nexe = env.ComponentProgram(nexe_name, [FAKE_STARTUP, src]) | 57 nexe = env.ComponentProgram(nexe_name, [FAKE_STARTUP, src]) |
58 | 58 |
59 # NOTE: we avoid using zero as the "good" exit status and just | 59 # NOTE: we avoid using zero as the "good" exit status and just |
60 # arbitrarily picked 55. All tests are coded to follow this model. | 60 # arbitrarily picked 55. All tests are coded to follow this model. |
61 node = env.CommandSelLdrTestNacl(out, nexe, exit_status='55') | 61 node = env.CommandSelLdrTestNacl(out, nexe, exit_status='55') |
| 62 if env.Bit('target_mips32'): |
| 63 env.AddBiasForPNaCl() |
62 | 64 |
63 env.AddNodeToTestSuite(node, | 65 env.AddNodeToTestSuite(node, |
64 ['small_tests', 'sel_ldr_tests', 'barebones_tests'], | 66 ['small_tests', 'sel_ldr_tests', 'barebones_tests'], |
65 test, | 67 test, |
66 is_broken=is_broken) | 68 is_broken=is_broken) |
67 | 69 |
68 # The top_of_sandbox test does not apply to x86-32 because the bug | 70 # The top_of_sandbox test does not apply to x86-32 because the bug |
69 # it tests for cannot happen in a segment-based sandbox, only with | 71 # it tests for cannot happen in a segment-based sandbox, only with |
70 # a sandbox where some kind of address-masking is done. | 72 # a sandbox where some kind of address-masking is done. |
71 if not env.Bit('pnacl_generate_pexe') and not env.Bit('build_x86_32'): | 73 if not env.Bit('pnacl_generate_pexe') and not env.Bit('build_x86_32'): |
72 native_env = env.Clone() | 74 native_env = env.Clone() |
73 if native_env.Bit('bitcode'): | 75 if native_env.Bit('bitcode'): |
74 native_env.AddBiasForPNaCl() | 76 native_env.AddBiasForPNaCl() |
75 native_env.PNaClForceNative() | 77 native_env.PNaClForceNative() |
76 | 78 |
77 nexe = native_env.ComponentProgram('top_of_sandbox', ['top_of_sandbox.c']) | 79 nexe = native_env.ComponentProgram('top_of_sandbox', ['top_of_sandbox.c']) |
78 node = native_env.CommandSelLdrTestNacl('top_of_sandbox.out', nexe) | 80 node = native_env.CommandSelLdrTestNacl('top_of_sandbox.out', nexe) |
79 native_env.AddNodeToTestSuite( | 81 native_env.AddNodeToTestSuite( |
80 node, ['small_tests', 'sel_ldr_tests', 'barebones_tests'], | 82 node, ['small_tests', 'sel_ldr_tests', 'barebones_tests'], |
81 'run_top_of_sandbox_test', | 83 'run_top_of_sandbox_test', |
82 is_broken=is_glibc) | 84 is_broken=is_glibc) |
OLD | NEW |