OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2010 The Native Client Authors. All rights reserved. | 2 # Copyright 2010 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 for basename in barebones_tests: | 52 for basename in barebones_tests: |
53 | 53 |
54 # c.f. http://code.google.com/p/nativeclient/issues/detail?id=783 | 54 # c.f. http://code.google.com/p/nativeclient/issues/detail?id=783 |
55 if env.Bit('build_arm') and basename == 'vaarg': continue | 55 if env.Bit('build_arm') and basename == 'vaarg': continue |
56 | 56 |
57 # TODO(kcc): the barebones tests confuse the current nacl-ified valgrind. | 57 # TODO(kcc): the barebones tests confuse the current nacl-ified valgrind. |
58 if env.IsRunningUnderValgrind(): continue | 58 if env.IsRunningUnderValgrind(): continue |
59 | 59 |
60 src = 'barebones_' + basename + '.c' | 60 src = 'barebones_' + basename + '.c' |
61 nexe = 'barebones_' + basename + '.nexe' | 61 nexe_name = 'barebones_' + basename |
62 out = 'barebones_' + basename + '.out' | 62 out = 'barebones_' + basename + '.out' |
63 test = 'run_barebones_' + basename + '_test' | 63 test = 'run_barebones_' + basename + '_test' |
64 test = 'run_barebones_' + basename + '_test' | 64 test = 'run_barebones_' + basename + '_test' |
65 env.ComponentProgram(nexe, [FAKE_STARTUP, src]) | 65 nexe = env.ComponentProgram(nexe_name, [FAKE_STARTUP, src]) |
66 | 66 |
67 # NOTE: we avoid using zero as the "good" exit status and just | 67 # NOTE: we avoid using zero as the "good" exit status and just |
68 # arbitrarily picked 55. All tests are coded to follow this model. | 68 # arbitrarily picked 55. All tests are coded to follow this model. |
69 node = env.CommandSelLdrTestNacl( | 69 node = env.CommandSelLdrTestNacl(out, nexe, exit_status='55') |
70 out, | 70 |
71 command=[env.File(nexe)], | |
72 exit_status='55',) | |
73 env.AddNodeToTestSuite(node, | 71 env.AddNodeToTestSuite(node, |
74 ['small_tests', 'sel_ldr_tests', 'barebones_tests'], | 72 ['small_tests', 'sel_ldr_tests', 'barebones_tests'], |
75 test, | 73 test, |
76 is_broken=is_broken) | 74 is_broken=is_broken) |
77 | 75 |
78 | 76 |
79 # a test that the validador can handle an empty segment after the last | 77 # a test that the validator can handle an empty segment after the last |
80 # real segment. The gold linker produces files this | 78 # real segment. The gold linker produces files this |
81 if env.Bit('build_arm') and not env.Bit('bitcode'): | 79 if env.Bit('build_arm') and not env.Bit('bitcode'): |
82 nexe = '${SCONSTRUCT_DIR}/tests/prebuilt/arm/gold-barebones_hello_world.nexe' | 80 nexe = env.File( |
| 81 '${SCONSTRUCT_DIR}/tests/prebuilt/arm/gold-barebones_hello_world${PROGSUFFIX}' |
| 82 ) |
83 node = env.CommandSelLdrTestNacl( | 83 node = env.CommandSelLdrTestNacl( |
84 'gold-barebones_hello_world.out', | 84 'gold-barebones_hello_world.out', |
85 command=[env.File(nexe)], | 85 nexe, |
86 exit_status='55',) | 86 exit_status='55',) |
87 env.AddNodeToTestSuite(node, | 87 env.AddNodeToTestSuite(node, |
88 ['small_tests', 'sel_ldr_tests'], | 88 ['small_tests', 'sel_ldr_tests'], |
89 'run_gold-barebones_hello_world_test', | 89 'run_gold-barebones_hello_world_test', |
90 is_broken=is_broken) | 90 is_broken=is_broken) |
OLD | NEW |