OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 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 # IRT backward compatibility test | 8 # IRT backward compatibility test |
9 | 9 |
10 # This test uses a nexe built by another test. Nexes do not get | 10 # This test uses a nexe built by another test. Nexes do not get |
11 # staged in pexe mode, so only run this test in nonpexe mode. | 11 # staged in pexe mode, so only run this test in nonpexe mode. |
12 if env.Bit('pnacl_generate_pexe'): | 12 if env.Bit('pnacl_generate_pexe'): |
13 Return() | 13 Return() |
14 | 14 |
15 blob_env = env['NACL_IRT_ENV'].Clone() | 15 blob_env = env['NACL_IRT_ENV'].Clone() |
16 blob_env.Append(LINKFLAGS=['-Wl,-Trodata-segment=${IRT_BLOB_DATA_START}', | 16 blob_env.Append(LINKFLAGS=['-Wl,-Trodata-segment=${IRT_BLOB_DATA_START}', |
17 '-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}']) | 17 '-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}']) |
18 | 18 |
19 # Build custom IRT library which provides a minimal subset of old | 19 # Build custom IRT library which provides a minimal subset of old |
20 # interface versions. | 20 # interface versions. |
21 blob_env.Append(CPPDEFINES=[['ALLOW_DYNAMIC_LINKING', | 21 blob_env.Append(CPPDEFINES=[['ALLOW_DYNAMIC_LINKING', |
22 str(int(not env.Bit('nacl_static_link')))]]) | 22 str(int(not env.Bit('nacl_static_link')))]]) |
23 irt_comp_test_library = blob_env.ComponentProgram( | 23 irt_comp_test_raw_library = blob_env.ComponentProgram( |
24 'irt_comp_test', ['irt_comp_interfaces.c'], | 24 'irt_comp_test_raw', ['irt_comp_interfaces.c'], |
25 EXTRA_LIBS=['irt_support_private']) | 25 EXTRA_LIBS=['irt_support_private']) |
26 | 26 |
| 27 irt_comp_test_library = env.ApplyTLSEdit( |
| 28 'irt_comp_test', |
| 29 irt_comp_test_raw_library) |
| 30 |
27 # Don't provide IRT, we provide it ourselves via -B. | 31 # Don't provide IRT, we provide it ourselves via -B. |
28 env.ClearBits('tests_use_irt') | 32 env.ClearBits('tests_use_irt') |
29 | 33 |
30 node = env.CommandSelLdrTestNacl( | 34 node = env.CommandSelLdrTestNacl( |
31 'irt_compatibility_test.out', | 35 'irt_compatibility_test.out', |
32 env.File('${STAGING_DIR}/hello_world.nexe'), | 36 env.File('${STAGING_DIR}/hello_world.nexe'), |
33 sel_ldr_flags=['-B', irt_comp_test_library], | 37 sel_ldr_flags=['-B', irt_comp_test_library], |
34 stdout_golden=env.File('../hello_world/hello_world.stdout')) | 38 stdout_golden=env.File('../hello_world/hello_world.stdout')) |
35 | 39 |
36 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_compatibility_test') | 40 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_compatibility_test') |
OLD | NEW |