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.
8 # Run these tests natively to see how much overhead NaCl adds. This
9 # only works on Linux because the tests use pthreads (not available on
10 # Windows) and clock_gettime(). Although Mac OS X doesn't implement
11 # clock_gettime, a compatibility implementation is provided in
12 # perf_test_compat_osx.cc.
13 if env.Bit('windows'):
17 'perf_test_runner.cc',
18 'perf_test_basics.cc',
19 'perf_test_threads.cc',
23 inputs += ['perf_test_compat_osx.cc']
25 exe = env.ComponentProgram('performance_test', inputs, EXTRA_LIBS=['platform'])
27 node = env.CommandTest(
28 'performance_test.out', [exe, env.GetPerfEnvDescription()],
29 # Don't hide output: We want the timings to be reported in the
30 # Buildbot logs so that Buildbot records the "RESULT" lines.
32 # Disable this on Valgrind because TestThreadWakeup is very slow under
33 # Valgrind, and because we don't particularly need to measure
34 # performance under Valgrind.
35 env.AddNodeToTestSuite(node, ['small_tests'], 'run_trusted_performance_test',
36 is_broken=env.Bit('running_on_valgrind'))