Chromium Code Reviews| 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 tls_edit_exe = env.GetTLSEdit() | |
| 28 | |
| 29 irt_comp_test_library = env.Command( | |
|
Mark Seaborn
2014/02/03 22:31:47
How about putting an ApplyTlsEdit() command in SCo
| |
| 30 'irt_comp_test', | |
| 31 [tls_edit_exe, irt_comp_test_raw_library], | |
| 32 '${SOURCES} ${TARGET}' | |
| 33 ) | |
| 34 | |
| 27 # Don't provide IRT, we provide it ourselves via -B. | 35 # Don't provide IRT, we provide it ourselves via -B. |
| 28 env.ClearBits('tests_use_irt') | 36 env.ClearBits('tests_use_irt') |
| 29 | 37 |
| 30 node = env.CommandSelLdrTestNacl( | 38 node = env.CommandSelLdrTestNacl( |
| 31 'irt_compatibility_test.out', | 39 'irt_compatibility_test.out', |
| 32 env.File('${STAGING_DIR}/hello_world.nexe'), | 40 env.File('${STAGING_DIR}/hello_world.nexe'), |
| 33 sel_ldr_flags=['-B', irt_comp_test_library], | 41 sel_ldr_flags=['-B', irt_comp_test_library], |
| 34 stdout_golden=env.File('../hello_world/hello_world.stdout')) | 42 stdout_golden=env.File('../hello_world/hello_world.stdout')) |
| 35 | 43 |
| 36 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_compatibility_test') | 44 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_compatibility_test') |
| OLD | NEW |