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 os | 6 import os |
7 | 7 |
8 Import('env') | 8 Import('env') |
9 | 9 |
10 if 'TRUSTED_ENV' not in env: | 10 if 'TRUSTED_ENV' not in env: |
11 Return() | 11 Return() |
12 | 12 |
13 if env.UnderWindowsCoverage(): | 13 if env.UnderWindowsCoverage(): |
14 Return() | 14 Return() |
15 | 15 |
16 if env.Bit('target_arm') or env.Bit('target_mips32'): | 16 if env.Bit('target_arm') or env.Bit('target_mips32'): |
17 if env.UsingEmulator(): | 17 if env.UsingEmulator(): |
18 # nacl-gdb is built with ARM support but not MIPS support. | 18 # nacl-gdb is built with ARM support but not MIPS support. |
19 if env.Bit('target_mips32'): | 19 if env.Bit('target_mips32'): |
20 Return() | 20 Return() |
21 platform_build_dir = env.GetPlatformBuildTargetDir() | 21 nacl_x86_toolchain_dir = env.GetToolchainDir(target_arch='x86', |
22 toolchain_name = env.GetToolchainName(target_arch='x86', | 22 is_pnacl=False, |
23 is_pnacl=False, | 23 lib_name='newlib') |
24 lib_name='newlib') | |
25 | |
26 nacl_x86_toolchain_dir = env.GetToolchainDir( | |
27 platform_build_dir=platform_build_dir, | |
28 toolchain_name=toolchain_name | |
29 ) | |
30 nacl_gdb_path = os.path.join(nacl_x86_toolchain_dir, 'bin', 'i686-nacl-gdb') | 24 nacl_gdb_path = os.path.join(nacl_x86_toolchain_dir, 'bin', 'i686-nacl-gdb') |
31 env.Replace(GDB=nacl_gdb_path) | 25 env.Replace(GDB=nacl_gdb_path) |
32 else: | 26 else: |
33 # Use the system's ARM/MIPS GDB because the NaCl toolchain does not | 27 # Use the system's ARM/MIPS GDB because the NaCl toolchain does not |
34 # include a copy of GDB built to run on ARM/MIPS. | 28 # include a copy of GDB built to run on ARM/MIPS. |
35 env.Replace(GDB='gdb') | 29 env.Replace(GDB='gdb') |
36 # Unlike nacl-gdb, the system version of GDB does not support the | 30 # Unlike nacl-gdb, the system version of GDB does not support the |
37 # "nacl-irt" command. | 31 # "nacl-irt" command. |
38 if env.Bit('tests_use_irt'): | 32 if env.Bit('tests_use_irt'): |
39 Return() | 33 Return() |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 # work on qemu-arm. | 156 # work on qemu-arm. |
163 AddGdbTest('break_continue_thread', is_thread_test=True, | 157 AddGdbTest('break_continue_thread', is_thread_test=True, |
164 is_broken=env.UsingEmulator()) | 158 is_broken=env.UsingEmulator()) |
165 | 159 |
166 AddGdbTest('syscall_thread', is_thread_test=True) | 160 AddGdbTest('syscall_thread', is_thread_test=True) |
167 | 161 |
168 # We don't run this test on non-x86 architectures or PNaCl since it | 162 # We don't run this test on non-x86 architectures or PNaCl since it |
169 # contains inline assembly. | 163 # contains inline assembly. |
170 if env.Bit('target_x86') and not env.Bit('bitcode'): | 164 if env.Bit('target_x86') and not env.Bit('bitcode'): |
171 AddGdbTest('mmap') | 165 AddGdbTest('mmap') |
OLD | NEW |