Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / glibc_syscall_wrappers / nacl.scons
1 # -*- python -*-
2 # Copyright 2008 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 # There is no stat64 in newlib
9 if not env.Bit('nacl_glibc'):
10   Return()
11
12 test_stat_nexe = env.ComponentProgram('test_stat', 'test_stat.c')
13
14 test_stat = env.CommandSelLdrTestNacl(
15     'test_stat.out',
16      test_stat_nexe,
17      args=[env.File('test_stat_data')])
18
19 env.AddNodeToTestSuite(test_stat, ['small_tests'], 'run_stat_test')
20
21 test_fstat_nexe = env.ComponentProgram('test_fstat', 'test_fstat.c')
22
23 test_fstat = env.CommandSelLdrTestNacl(
24     'test_fstat.out',
25     test_fstat_nexe,
26     args=[env.File('test_stat_data')],
27     stdout_golden=env.File('test_fstat.stdout'))
28
29 env.AddNodeToTestSuite(test_fstat, ['small_tests'], 'run_fstat_test')
30
31 test_dir_nexe = env.ComponentProgram('test_dir', 'test_dir.c')
32
33 test_dir = env.CommandSelLdrTestNacl(
34     'test_dir.out',
35     test_dir_nexe,
36     args=[test_dir_nexe.path.rstrip('test_dir${PROGSUFFIX}')])
37
38 # TODO(bsy): This is broken because sel_ldr's getdents() syscall
39 # expects "struct nacl_abi_dirent" to match up with the kernel's
40 # "struct dirent" on Linux, and this no longer the case.
41 # See http://code.google.com/p/nativeclient/issues/detail?id=1253
42 env.AddNodeToTestSuite(test_dir, ['small_tests'], 'run_dir_test',
43                        is_broken=True)
44
45 test_time_nexe = env.ComponentProgram('test_time', 'test_time.c')
46
47 test_time = env.CommandSelLdrTestNacl('test_time.out', test_time_nexe)
48
49 env.AddNodeToTestSuite(test_time, ['small_tests'], 'run_time_test')
50
51 test_rewind_nexe = env.ComponentProgram('test_rewind', 'test_rewind.c')
52
53 test_rewind = env.CommandSelLdrTestNacl(
54     'test_rewind.out',
55     test_rewind_nexe,
56     args=[env.File('test_rewind_data')])
57
58 env.AddNodeToTestSuite(test_rewind, ['small_tests'], 'run_rewind_test')