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
4 # be 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 = env.AddBootstrap(env.GetSelLdr(), ['-v', '-f', test_prog])
20 # Run sel_ldr through qemu-arm. Add "-Q" to disable the platform
21 # qualification tests because they fail under qemu-arm.
22 sel_ldr_command = [env.GetEmulator()] + sel_ldr_command + ['-Q']
24 is_broken = not env.Bit('nacl_static_link') or env.GetSelLdr() is None
26 if env.Bit('build_arm') or env.Bit('build_mips32'):
27 # Use the system's 'nm' tool. The NaCl toolchain will not be
28 # available on the ARM hardware bots, but they will be running Linux
29 # with a normal GNU toolchain available.
32 # Use the NaCl toolchain's 'nm' tool since it is not available
33 # natively on Windows and Mac.
36 node = env.CommandTest(
37 'debug_stub_test.out',
38 command=(['${PYTHON}', env.File('debug_stub_test.py'), '-v']
39 + ['--', env.get('TARGET_FULLARCH'), nm_tool] + sel_ldr_command),
40 extra_deps=[env.File('gdb_rsp.py')],
41 # Don't run the host Python through qemu-arm.
42 direct_emulation=False)
43 env.AddNodeToTestSuite(node, ['medium_tests', 'nonpexe_tests'],
44 'run_debug_stub_test', is_broken=is_broken)
45 env.TestBindsFixedTcpPort(node)