Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Side by Side Diff: tests/nanosleep/nacl.scons

Issue 7020011: disable timing tests on windows. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/syscalls/nacl.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 6
7 Import('env') 7 Import('env')
8 8
9 test_is_broken_on_this_os=False
9 slop_args = [] 10 slop_args = []
10 11
11 if 'TRUSTED_ENV' in env and (env['TRUSTED_ENV'].Bit('windows') or 12 if 'TRUSTED_ENV' in env and (env['TRUSTED_ENV'].Bit('windows') or
12 env['TRUSTED_ENV'].Bit('mac')): 13 env['TRUSTED_ENV'].Bit('mac')):
13 slop_args += ['-s', '10'] 14 slop_args += ['-s', '10']
14 # Number of milliseconds by which a thread is allowed to wake up 15 # Number of milliseconds by which a thread is allowed to wake up
15 # early, after invoking nanosleep (on Windows, implemnted via 16 # early, after invoking nanosleep (on Windows, implemnted via
16 # Sleep()). On WinXP, Sleep sometimes return early. 17 # Sleep()). On WinXP, Sleep sometimes return early.
17 18
19 if 'TRUSTED_ENV' in env and env['TRUSTED_ENV'].Bit('windows'):
20 test_is_broken_on_this_os=True
21
18 env.ComponentProgram('nanosleep_test.nexe', 22 env.ComponentProgram('nanosleep_test.nexe',
19 'nanosleep_test.c', 23 'nanosleep_test.c',
20 EXTRA_LIBS=['pthread']) 24 EXTRA_LIBS=['pthread'])
21 25
22 # This is a timing test, so we only run on real hardware 26 # This is a timing test, so we only run on real hardware
23 is_broken = env.Bit('running_on_vm') 27 is_broken = env.Bit('running_on_vm')
24 28
25 node = env.CommandSelLdrTestNacl( 29 node = env.CommandSelLdrTestNacl(
26 'nanosleep_test.out', 30 'nanosleep_test.out',
27 command=[env.File('nanosleep_test.nexe')] + slop_args) 31 command=[env.File('nanosleep_test.nexe')] + slop_args)
28 env.AddNodeToTestSuite(node, ['small_tests'], 'run_nanosleep_test', 32 env.AddNodeToTestSuite(node, ['small_tests'], 'run_nanosleep_test',
29 is_broken=is_broken) 33 is_broken=is_broken or test_is_broken_on_this_os)
jasonwkim 2011/06/01 17:38:32 What about is_on_vm?
bsy 2011/06/01 18:21:16 renamed here and on line 27.
OLDNEW
« no previous file with comments | « no previous file | tests/syscalls/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698