Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / irt_private_pthread / 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 # This test needs the IRT version of __aeabi_read_tp, and not the one that
9 # gets linked into pexes post-translation.
10 if env.Bit('bitcode'):
11   Return()
12
13 # This test reports races under tsan because:
14 #  * The Valgrind interceptors are not hooked up because we are not
15 #    linking this test with '-Wl,-u,have_nacl_valgrind_interceptors'.
16 #  * The Valgrind interceptors don't work because we use malloc() in
17 #    __pthread_initialize() and the intercepted malloc() uses TLS.
18 is_broken = env.Bit('running_on_valgrind')
19
20 irt_thread_test_raw = env.ComponentProgram(
21     'irt_thread_test_raw', ['irt_thread_test.c'],
22     EXTRA_LIBS=['irt_support_private'])
23
24 irt_thread_test_nexe = env.ApplyTLSEdit(
25     'irt_thread_test.nexe',
26     irt_thread_test_raw)
27
28 node = env.CommandSelLdrTestNacl('irt_thread_test.out', irt_thread_test_nexe)
29 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_thread_test',
30                        is_broken=is_broken)