Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / faulted_thread_queue / nacl.scons
1 #! -*- python -*-
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.
5
6 Import('env')
7
8 if 'TRUSTED_ENV' not in env:
9   Return()
10 trusted_env = env['TRUSTED_ENV']
11
12 if not env.AllowInlineAssembly():
13   Return()
14
15 test_guest = env.ComponentProgram(
16     'faultqueue_test_guest', ['faultqueue_test_guest.c'],
17     EXTRA_LIBS=['${NONIRT_LIBS}', 'test_common'])
18
19 test_host = trusted_env.ComponentProgram(
20     'faultqueue_test_host', ['faultqueue_test_host.c'],
21     EXTRA_LIBS=['sel', 'test_common'])
22
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())
28
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)