2 # Copyright 2012 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 if not env.AllowInlineAssembly():
11 if env.UnderWindowsCoverage():
14 test_prog = env.ComponentProgram(
15 'debugger_test', 'debugger_test.c',
16 EXTRA_LIBS=['${PTHREAD_LIBS}', '${NONIRT_LIBS}'])
18 sel_ldr_command = ['-v']
19 if env.Bit('tests_use_irt'):
20 sel_ldr_command += ['-B', env.GetIrtNexe()]
21 sel_ldr_command += ['-f', test_prog]
22 sel_ldr_command = env.AddBootstrap(env.GetSelLdr(), sel_ldr_command)
24 # Run sel_ldr through qemu-arm. Add "-Q" to disable the platform
25 # qualification tests because they fail under qemu-arm.
26 sel_ldr_command = [env.GetEmulator()] + sel_ldr_command + ['-Q']
28 is_broken = not env.Bit('nacl_static_link') or env.GetSelLdr() is None
30 if env.Bit('build_arm') or env.Bit('build_mips32'):
31 # Use the system's 'nm' tool. The NaCl toolchain will not be
32 # available on the ARM hardware bots, but they will be running Linux
33 # with a normal GNU toolchain available.
36 # Use the NaCl toolchain's 'nm' tool since it is not available
37 # natively on Windows and Mac.
40 node = env.CommandTest(
41 'debug_stub_test.out',
42 command=(['${PYTHON}', env.File('debug_stub_test.py'), '-v']
43 + ['--', env.get('TARGET_FULLARCH'), nm_tool] + sel_ldr_command),
44 extra_deps=[env.File('gdb_rsp.py')],
45 # Don't run the host Python through qemu-arm.
46 direct_emulation=False,
48 env.AddNodeToTestSuite(node, ['medium_tests', 'nonpexe_tests'],
49 'run_debug_stub_test', is_broken=is_broken)
50 env.TestBindsFixedTcpPort(node)