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( |
70 out, | 70 out, nexe, |
jvoung - send to chromium...
2011/06/23 21:55:23
nit: does this fit all on one line now?
pdox
2011/06/23 22:03:31
Done.
| |
71 command=[env.File(nexe)], | |
72 exit_status='55',) | 71 exit_status='55',) |
73 env.AddNodeToTestSuite(node, | 72 env.AddNodeToTestSuite(node, |
74 ['small_tests', 'sel_ldr_tests', 'barebones_tests'], | 73 ['small_tests', 'sel_ldr_tests', 'barebones_tests'], |
75 test, | 74 test, |
76 is_broken=is_broken) | 75 is_broken=is_broken) |
77 | 76 |
78 | 77 |
79 # a test that the validador can handle an empty segment after the last | 78 # a test that the validator can handle an empty segment after the last |
80 # real segment. The gold linker produces files this | 79 # real segment. The gold linker produces files this |
81 if env.Bit('build_arm') and not env.Bit('bitcode'): | 80 if env.Bit('build_arm') and not env.Bit('bitcode'): |
82 nexe = '${SCONSTRUCT_DIR}/tests/prebuilt/arm/gold-barebones_hello_world.nexe' | 81 nexe = env.File( |
82 '${SCONSTRUCT_DIR}/tests/prebuilt/arm/gold-barebones_hello_world${PROGSUFFIX}' | |
83 ) | |
83 node = env.CommandSelLdrTestNacl( | 84 node = env.CommandSelLdrTestNacl( |
84 'gold-barebones_hello_world.out', | 85 'gold-barebones_hello_world.out', |
85 command=[env.File(nexe)], | 86 nexe, |
86 exit_status='55',) | 87 exit_status='55',) |
87 env.AddNodeToTestSuite(node, | 88 env.AddNodeToTestSuite(node, |
88 ['small_tests', 'sel_ldr_tests'], | 89 ['small_tests', 'sel_ldr_tests'], |
89 'run_gold-barebones_hello_world_test', | 90 'run_gold-barebones_hello_world_test', |
90 is_broken=is_broken) | 91 is_broken=is_broken) |
OLD | NEW |