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

Unified Diff: tests/clock/nacl.scons

Issue 23464007: Update glibc revision (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/clock/clock_test.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/clock/nacl.scons
diff --git a/tests/clock/nacl.scons b/tests/clock/nacl.scons
index bc88228a8a8033c1f09d837bb0bff43201c1f650..ccd55a1aab84203ec21787b434f25c8fcc07fc5e 100644
--- a/tests/clock/nacl.scons
+++ b/tests/clock/nacl.scons
@@ -5,6 +5,8 @@
# This is a basic functionality test to exercise the irt plumbing.
+import platform
+
Import('env')
time_check = env.File('${SCONSTRUCT_DIR}/tools/time_check.py')
@@ -51,3 +53,34 @@ node = env.CommandSelLdrTestNacl(
'--'])
env.AddNodeToTestSuite(node, ['small_tests'], 'run_clock_get_test')
+
+clock_test_nexe = env.ComponentProgram('clock_test',
+ 'clock_test.c',
+ EXTRA_LIBS=['${PTHREAD_LIBS}',
+ '${NONIRT_LIBS}'])
+
+# On OSX and Windows, we have observed sleep returning early. The
+# time_slop_args is used in clock_test to permit some extra slop
+# in the elapsed time (in ms).
+time_slop_args = []
+
+# On Linux the older scheduler implementation did not account properly
+# for the time process spent waiting on the futex in thread join. This
+# affects the CLOCK_PROCESS/THREAD_CPUTIME_ID clock test and we therefore
+# disable this test on older kernels.
+cputime_args = []
+
+if env.Bit('host_windows') or env.Bit('host_mac'):
+ time_slop_args += [ '-s', '10' ]
+elif env.Bit('host_linux'):
+ kernel_version = map(int, platform.release().split('.', 2)[:2])
+ if kernel_version < [3, 0]:
+ cputime_args += [ '-c' ]
+
+node = env.CommandSelLdrTestNacl(
+ 'clock_test.out',
+ clock_test_nexe,
+ time_slop_args + cputime_args,
+ size='large')
+
+env.AddNodeToTestSuite(node, ['large_tests'], 'run_clock_test')
« no previous file with comments | « tests/clock/clock_test.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698