Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / thread_suspension / nacl.scons
1 # -*- python -*-
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.
5
6 Import('env')
7
8 # suspend_test_guest.nexe fails to link when Valgrind is enabled
9 # because of a problem with the TLS ".tbss" section.
10 if env.IsRunningUnderValgrind():
11   Return()
12
13 if 'TRUSTED_ENV' not in env:
14   Return()
15 trusted_env = env['TRUSTED_ENV']
16
17 if not env.AllowInlineAssembly():
18   Return()
19
20 test_guest = env.ComponentProgram(
21     'suspend_test_guest', ['suspend_test_guest.c'],
22     EXTRA_LIBS=['${NONIRT_LIBS}', 'test_common'])
23
24 test_host = trusted_env.ComponentProgram(
25     'suspend_test_host', ['suspend_test_host.c'],
26     EXTRA_LIBS=['sel', 'test_common'])
27
28 node = env.CommandTest('thread_suspension_test.out',
29                        env.AddBootstrap(test_host, [test_guest]),
30                        size='large')
31 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'],
32                        'run_thread_suspension_test',
33                        is_broken=not env.Bit('nacl_static_link') or
34 # This test is flaky on mac10.7-newlib-dbg-asan.
35 # See https://code.google.com/p/nativeclient/issues/detail?id=3906
36                                  (env.Bit('asan') and env.Bit('host_mac')))