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 # All tests below involve native assembler | 8 # All tests below involve native assembler |
9 | 9 |
10 HALT_SLED_SIZE=32 | 10 HALT_SLED_SIZE=32 |
(...skipping 17 matching lines...) Expand all Loading... |
28 # really a supported use of the PNaCl toolchain. These tests are too | 28 # really a supported use of the PNaCl toolchain. These tests are too |
29 # dependent on the layout that the linker happens to produce, so the tests | 29 # dependent on the layout that the linker happens to produce, so the tests |
30 # are likely to break or become ineffective if the linker is changed. | 30 # are likely to break or become ineffective if the linker is changed. |
31 if env.Bit('bitcode'): | 31 if env.Bit('bitcode'): |
32 Return() | 32 Return() |
33 | 33 |
34 # ---------------------------------------------------------- | 34 # ---------------------------------------------------------- |
35 # Tests that require a NaCl module | 35 # Tests that require a NaCl module |
36 # ---------------------------------------------------------- | 36 # ---------------------------------------------------------- |
37 | 37 |
38 if env.Bit('target_x86_32'): | 38 if env.Bit('build_x86_32'): |
39 nacl_text_pad_asm = 'arch/x86_32/nacl_text_pad_test.S' | 39 nacl_text_pad_asm = 'arch/x86_32/nacl_text_pad_test.S' |
40 elif env.Bit('target_x86_64'): | 40 elif env.Bit('build_x86_64'): |
41 nacl_text_pad_asm = 'arch/x86_64/nacl_text_pad_test.S' | 41 nacl_text_pad_asm = 'arch/x86_64/nacl_text_pad_test.S' |
42 elif env.Bit('target_arm'): | 42 elif env.Bit('build_arm'): |
43 nacl_text_pad_asm = 'arch/arm/nacl_text_pad_test.S' | 43 nacl_text_pad_asm = 'arch/arm/nacl_text_pad_test.S' |
44 elif env.Bit('target_mips32'): | 44 elif env.Bit('build_mips32'): |
45 nacl_text_pad_asm = 'arch/mips/nacl_text_pad_test.S' | 45 nacl_text_pad_asm = 'arch/mips/nacl_text_pad_test.S' |
46 else: | 46 else: |
47 raise Exception('unknown architecture') | 47 raise Exception('unknown architecture') |
48 | 48 |
49 def NewAsmEnv(env, defines, rodata_address, rwdata_address): | 49 def NewAsmEnv(env, defines, rodata_address, rwdata_address): |
50 asm_env = env.Clone() | 50 asm_env = env.Clone() |
51 # NOTE(robertm): convert this to pure C code so that most of this | 51 # NOTE(robertm): convert this to pure C code so that most of this |
52 # special handling can be eliminated | 52 # special handling can be eliminated |
53 link_cmd = ('${LD} -static -e _start ${TEXT_START} ${RO_START} ${RW_START}' + | 53 link_cmd = ('${LD} -static -e _start ${TEXT_START} ${RO_START} ${RW_START}' + |
54 ' -o ${TARGET} ${SOURCES}') | 54 ' -o ${TARGET} ${SOURCES}') |
55 | 55 |
56 if env.Bit('target_x86_32'): | 56 if env.Bit('build_x86_32'): |
57 link_cmd += ' -melf_i386_nacl' | 57 link_cmd += ' -melf_i386_nacl' |
58 elif env.Bit('target_x86_64'): | 58 elif env.Bit('build_x86_64'): |
59 link_cmd += ' -melf_x86_64_nacl' | 59 link_cmd += ' -melf_x86_64_nacl' |
60 elif env.Bit('target_arm'): | 60 elif env.Bit('build_arm'): |
61 link_cmd += ' -marmelf_nacl' | 61 link_cmd += ' -marmelf_nacl' |
62 elif env.Bit('target_mips32'): | 62 elif env.Bit('build_mips32'): |
63 link_cmd += ' -mmipselelf_nacl' | 63 link_cmd += ' -mmipselelf_nacl' |
64 else: | 64 else: |
65 raise Exception('unknown architecture') | 65 raise Exception('unknown architecture') |
66 | 66 |
67 asm_env['LINKCOM'] = link_cmd | 67 asm_env['LINKCOM'] = link_cmd |
68 | 68 |
69 asm_env.Append(CPPDEFINES = [ | 69 asm_env.Append(CPPDEFINES = [ |
70 ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ], | 70 ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ], |
71 ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ], | 71 ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ], |
72 ]) | 72 ]) |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 expected_exit_status = 'trusted_sigabrt' | 182 expected_exit_status = 'trusted_sigabrt' |
183 else: | 183 else: |
184 expected_exit_status = 0 | 184 expected_exit_status = 0 |
185 | 185 |
186 node = env.CommandSelLdrTestNacl(base_name + '.out', nexe, | 186 node = env.CommandSelLdrTestNacl(base_name + '.out', nexe, |
187 exit_status=expected_exit_status) | 187 exit_status=expected_exit_status) |
188 | 188 |
189 env.AddNodeToTestSuite(node, | 189 env.AddNodeToTestSuite(node, |
190 ['small_tests', 'sel_ldr_sled_tests'], | 190 ['small_tests', 'sel_ldr_sled_tests'], |
191 'run_' + base_name) | 191 'run_' + base_name) |
OLD | NEW |