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
4 # found in the LICENSE file.
8 # IRT backward compatibility test
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.
12 if env.Bit('pnacl_generate_pexe'):
15 blob_env = env['NACL_IRT_ENV'].Clone()
16 blob_env.Append(LINKFLAGS=['-Wl,-Trodata-segment=${IRT_BLOB_DATA_START}',
17 '-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}'])
19 # Build custom IRT library which provides a minimal subset of old
21 blob_env.Append(CPPDEFINES=[['ALLOW_DYNAMIC_LINKING',
22 str(int(not env.Bit('nacl_static_link')))]])
23 irt_comp_test_library = blob_env.ComponentProgram(
24 'irt_comp_test', ['irt_comp_interfaces.c'],
25 EXTRA_LIBS=['irt_support_private'])
27 # Don't provide IRT, we provide it ourselves via -B.
28 env.ClearBits('tests_use_irt')
30 node = env.CommandSelLdrTestNacl(
31 'irt_compatibility_test.out',
32 env.File('${STAGING_DIR}/hello_world.nexe'),
33 sel_ldr_flags=['-B', irt_comp_test_library],
34 stdout_golden=env.File('../hello_world/hello_world.stdout'))
36 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_compatibility_test')