OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2008 The Native Client Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
5 | 5 |
6 | 6 |
7 | 7 |
8 Import('env') | 8 Import('env') |
9 | 9 |
| 10 time_test_is_broken_on_this_os=False |
| 11 if 'TRUSTED_ENV' in env and env['TRUSTED_ENV'].Bit('windows'): |
| 12 time_test_is_broken_on_this_os=True |
| 13 |
10 env.ComponentLibrary('syscall_test_framework', ['test.cc']) | 14 env.ComponentLibrary('syscall_test_framework', ['test.cc']) |
11 | 15 |
12 env.ComponentProgram('syscalls.nexe', | 16 env.ComponentProgram('syscalls.nexe', |
13 'syscalls.cc', | 17 'syscalls.cc', |
14 EXTRA_LIBS=['pthread']) | 18 EXTRA_LIBS=['pthread']) |
15 | 19 |
16 if not env.Bit('host_windows'): | 20 if not env.Bit('host_windows'): |
17 # Creating a R/W test file in the output directory. | 21 # Creating a R/W test file in the output directory. |
18 # Because this test gets built on one platform and run on another (arm), | 22 # Because this test gets built on one platform and run on another (arm), |
19 # explaining to scons that this file is a dependency of the build and not | 23 # explaining to scons that this file is a dependency of the build and not |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 env.ComponentProgram('sysbrk_test.nexe', | 119 env.ComponentProgram('sysbrk_test.nexe', |
116 ['sysbrk_test.cc'], | 120 ['sysbrk_test.cc'], |
117 EXTRA_LIBS=['syscall_test_framework']) | 121 EXTRA_LIBS=['syscall_test_framework']) |
118 | 122 |
119 node = env.CommandSelLdrTestNacl('sysbrk_test.out', | 123 node = env.CommandSelLdrTestNacl('sysbrk_test.out', |
120 command=[env.File('sysbrk_test.nexe')]) | 124 command=[env.File('sysbrk_test.nexe')]) |
121 env.AddNodeToTestSuite(node, | 125 env.AddNodeToTestSuite(node, |
122 ['small_tests', 'sel_ldr_tests'], | 126 ['small_tests', 'sel_ldr_tests'], |
123 'run_sysbrk_test') | 127 'run_sysbrk_test') |
124 | 128 |
| 129 # These are timing tests, so we only run on real hardware |
| 130 is_on_vm = env.Bit('running_on_vm') |
| 131 |
125 # additions to add syscall tests 40-42 | 132 # additions to add syscall tests 40-42 |
126 env.ComponentProgram('timefuncs_test.nexe', | 133 env.ComponentProgram('timefuncs_test.nexe', |
127 ['timefuncs_test.cc'], | 134 ['timefuncs_test.cc'], |
128 EXTRA_LIBS=['pthread', 'syscall_test_framework']) | 135 EXTRA_LIBS=['pthread', 'syscall_test_framework']) |
129 node = env.CommandSelLdrTestNacl( | 136 node = env.CommandSelLdrTestNacl( |
130 'timefuncs_test.out', | 137 'timefuncs_test.out', |
131 command=[env.File('timefuncs_test.nexe')] | 138 command=[env.File('timefuncs_test.nexe')] |
132 ) | 139 ) |
133 | 140 |
134 env.AddNodeToTestSuite(node, | 141 env.AddNodeToTestSuite(node, |
135 ['small_tests', 'sel_ldr_tests'], | 142 ['small_tests', 'sel_ldr_tests'], |
136 'run_timefuncs_test', | 143 'run_timefuncs_test', |
137 ) | 144 is_broken=is_on_vm or time_test_is_broken_on_this_os |
| 145 ) |
138 | 146 |
139 raw_syscall_timefunc_objects = env.RawSyscallObjects(['timefuncs_test.cc']) | 147 raw_syscall_timefunc_objects = env.RawSyscallObjects(['timefuncs_test.cc']) |
140 env.ComponentProgram('raw_timefuncs_test.nexe', | 148 env.ComponentProgram('raw_timefuncs_test.nexe', |
141 raw_syscall_timefunc_objects, | 149 raw_syscall_timefunc_objects, |
142 EXTRA_LIBS=['syscall_test_framework']) | 150 EXTRA_LIBS=['syscall_test_framework']) |
143 | 151 |
144 # This is a timing test, so we only run on real hardware | |
145 is_broken = env.Bit('running_on_vm') | |
146 node = env.CommandSelLdrTestNacl('raw_timefuncs_test.out', | 152 node = env.CommandSelLdrTestNacl('raw_timefuncs_test.out', |
147 command=[env.File('raw_timefuncs_test.nexe')]) | 153 command=[env.File('raw_timefuncs_test.nexe')]) |
148 env.AddNodeToTestSuite(node, | 154 env.AddNodeToTestSuite(node, |
149 ['small_tests', 'sel_ldr_tests'], | 155 ['small_tests', 'sel_ldr_tests'], |
150 'run_raw_timefuncs_test', | 156 'run_raw_timefuncs_test', |
151 is_broken=is_broken) | 157 is_broken=is_on_vm or time_test_is_broken_on_this_os) |
OLD | NEW |