2 # Copyright 2012 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.
9 # Disable this on Valgrind because TestThreadWakeup is very slow under
10 # Valgrind, and because we don't particularly need to measure
11 # performance under Valgrind.
12 is_broken = env.Bit('running_on_valgrind')
15 if env.Bit('nacl_glibc'):
16 # Needed for clock_gettime().
19 nexe = env.ComponentProgram(
21 ['perf_test_runner.cc',
22 'perf_test_basics.cc',
23 'perf_test_exceptions.cc',
24 'perf_test_threads.cc'],
25 EXTRA_LIBS=['${NONIRT_LIBS}',
30 if 'TRUSTED_ENV' not in env:
32 trusted_env = env['TRUSTED_ENV']
34 node = env.CommandSelLdrTestNacl(
35 'performance_test.out', nexe, [env.GetPerfEnvDescription()],
36 # Pass '-e' to enable untrusted fault handling. This should not
37 # affect performance until the exception_handler() syscall is
38 # called -- the Windows debug exception handler process is
39 # launched and attached on demand.
41 # Don't hide output: We want the timings to be reported in the
42 # Buildbot logs so that Buildbot records the "RESULT" lines.
44 env.AddNodeToTestSuite(node, ['small_tests'], 'run_performance_test',
45 is_broken=is_broken or
46 # This test is flaky on mac10.7-newlib-dbg-asan.
47 # See https://code.google.com/p/nativeclient/issues/detail?id=3906
48 (env.Bit('asan') and env.Bit('host_mac')))