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
4 # found in the LICENSE file.
8 if 'TRUSTED_ENV' not in env:
10 trusted_env = env['TRUSTED_ENV']
12 if not env.AllowInlineAssembly():
15 test_guest = env.ComponentProgram(
16 'faultqueue_test_guest', ['faultqueue_test_guest.c'],
17 EXTRA_LIBS=['${NONIRT_LIBS}', 'test_common'])
19 test_host = trusted_env.ComponentProgram(
20 'faultqueue_test_host', ['faultqueue_test_host.c'],
21 EXTRA_LIBS=['sel', 'test_common'])
23 # This test is disabled for Valgrind because Valgrind does not
24 # recognise the HLT instruction and produces SIGILL for it rather than
25 # the SIGSEGV that this test expects.
26 is_broken = (not env.Bit('nacl_static_link') or
27 env.IsRunningUnderValgrind())
29 node = env.CommandTest('faulted_thread_queue_test.out',
30 env.AddBootstrap(test_host, [test_guest]))
31 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'],
32 'run_faulted_thread_queue_test', is_broken=is_broken)