Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / irt_ext / nacl.scons
1 # -*- python -*-
2 # Copyright (c) 2014 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 # IRT extensions test
9
10 # TODO(dyen): Currently IRT extensions only supports newlib.
11 if env.Bit('bitcode') or env.Bit('nacl_glibc'):
12   Return()
13
14 IRT_EXT_TEST_SRCS = [
15     'basic_calls.c',
16     'error_report.c',
17     'file_desc.c',
18     'mem_calls.c',
19     'threading.c',
20     ]
21
22 IRT_EXT_LIBC_TEST_SRCS = [
23     'libc/basic_tests.c',
24     'libc/file_tests.c',
25     'libc/libc_test.c',
26     'libc/mem_tests.c',
27     'libc/thread_tests.c',
28     ]
29
30 irt_ext_libc_test_nexe = env.ComponentProgram(
31     'irt_ext_libc_test',
32     (IRT_EXT_TEST_SRCS +
33      IRT_EXT_LIBC_TEST_SRCS),
34     EXTRA_LIBS=['${PTHREAD_LIBS}', '${NONIRT_LIBS}'])
35
36 node = env.CommandSelLdrTestNacl('irt_ext_libc_test.out',
37                                  irt_ext_libc_test_nexe)
38
39 env.AddNodeToTestSuite(node, ['small_tests'],
40                        'run_irt_ext_libc_test',
41                        # The thread related tests are flaky on mac asan.
42                        is_broken=(env.Bit('asan') and env.Bit('host_mac')))
43
44 irt_ext_no_pthread_nexe = env.ComponentProgram(
45     'irt_ext_no_pthread_test',
46     'no_pthread_test/no_pthread_test.c',
47     EXTRA_LIBS=['${NONIRT_LIBS}'])
48
49 node = env.CommandSelLdrTestNacl('irt_ext_no_pthread_test.out',
50                                  irt_ext_no_pthread_nexe)
51
52 env.AddNodeToTestSuite(node, ['small_tests'],
53                        'run_irt_ext_no_pthread_test')