Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / performance / build.scons
1 # -*- python -*-
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.
5
6 Import('env')
7
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'):
14   Return()
15
16 inputs = [
17     'perf_test_runner.cc',
18     'perf_test_basics.cc',
19     'perf_test_threads.cc',
20 ]
21
22 if env.Bit('mac'):
23   inputs += ['perf_test_compat_osx.cc']
24
25 exe = env.ComponentProgram('performance_test', inputs, EXTRA_LIBS=['platform'])
26
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.
31     capture_output=False)
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'))