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 # force inclusion of entire library, so that we can validate it | 8 # force inclusion of entire library, so that we can validate it |
9 # NOTE: This approach does not work for -lc because of tons of | 9 # NOTE: This approach does not work for -lc because of tons of |
10 # undefined symbols which would have to be stubbed out | 10 # undefined symbols which would have to be stubbed out |
(...skipping 28 matching lines...) Expand all Loading... |
39 # into the command line; so by clearing that, we prevent scons from | 39 # into the command line; so by clearing that, we prevent scons from |
40 # adding repeated -l switches at the end of the link. | 40 # adding repeated -l switches at the end of the link. |
41 nexe = env.ComponentProgram('dummy', 'dummy.c', | 41 nexe = env.ComponentProgram('dummy', 'dummy.c', |
42 EXTRA_LINKFLAGS=DEP_LINKFLAGS, | 42 EXTRA_LINKFLAGS=DEP_LINKFLAGS, |
43 LIBS=DEP_LIBS, | 43 LIBS=DEP_LIBS, |
44 _LIBFLAGS='') | 44 _LIBFLAGS='') |
45 node = env.CommandValidatorTestNacl('whole_archive_test.out', | 45 node = env.CommandValidatorTestNacl('whole_archive_test.out', |
46 image=nexe) | 46 image=nexe) |
47 env.AddNodeToTestSuite(node, | 47 env.AddNodeToTestSuite(node, |
48 ['toolchain_tests', 'small_tests'], | 48 ['toolchain_tests', 'small_tests'], |
49 'run_whole_archive_test') | 49 'run_whole_archive_test', |
| 50 # The old ncval doesn't like the new linker's style |
| 51 # of padding the code segment. TODO(mcgrathr): |
| 52 # Remove this is_broken= when we the old ncval is no |
| 53 # longer ever built and used for this test. |
| 54 is_broken=(env.IsNewLinker() and |
| 55 env.Bit('target_x86') and |
| 56 not env.Bit('validator_ragel'))) |
50 | 57 |
51 | 58 |
52 def AddIntrinsicTest(test_env, src, exit_status, | 59 def AddIntrinsicTest(test_env, src, exit_status, |
53 golden_file=None, test_suffix='', is_broken=False, | 60 golden_file=None, test_suffix='', is_broken=False, |
54 EXTRA_LIBS=[]): | 61 EXTRA_LIBS=[]): |
55 name = src.split('.')[0] | 62 name = src.split('.')[0] |
56 name += test_suffix | 63 name += test_suffix |
57 | 64 |
58 obj = test_env.ComponentObject(name, src) | 65 obj = test_env.ComponentObject(name, src) |
59 nexe = test_env.ComponentProgram( | 66 nexe = test_env.ComponentProgram( |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 asm_env.AddNodeToTestSuite(node, ['toolchain_tests', 'small_tests'], | 501 asm_env.AddNodeToTestSuite(node, ['toolchain_tests', 'small_tests'], |
495 'run_nop_test') | 502 'run_nop_test') |
496 | 503 |
497 if not env.Bit('nacl_disable_shared'): | 504 if not env.Bit('nacl_disable_shared'): |
498 env.NaClSharedLibrary('pic_constant_lib', ['pic_constant_lib.c']) | 505 env.NaClSharedLibrary('pic_constant_lib', ['pic_constant_lib.c']) |
499 nexe = env.ComponentProgram('pic_constant', ['pic_constant.c'], | 506 nexe = env.ComponentProgram('pic_constant', ['pic_constant.c'], |
500 EXTRA_LIBS=['pic_constant_lib', '${NONIRT_LIBS}']) | 507 EXTRA_LIBS=['pic_constant_lib', '${NONIRT_LIBS}']) |
501 node = env.CommandSelLdrTestNacl('pic_constant.out', nexe) | 508 node = env.CommandSelLdrTestNacl('pic_constant.out', nexe) |
502 env.AddNodeToTestSuite(node, ['toolchain_tests', 'small_tests'], | 509 env.AddNodeToTestSuite(node, ['toolchain_tests', 'small_tests'], |
503 'run_pic_constant_test') | 510 'run_pic_constant_test') |
OLD | NEW |