Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / performance / nacl.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
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')
13
14 libs = []
15 if env.Bit('nacl_glibc'):
16   # Needed for clock_gettime().
17   libs.append('rt')
18
19 nexe = env.ComponentProgram(
20     'performance_test',
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}',
26                 '${PTHREAD_LIBS}',
27                 '${EXCEPTION_LIBS}']
28                + libs)
29
30 if 'TRUSTED_ENV' not in env:
31   Return()
32 trusted_env = env['TRUSTED_ENV']
33
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.
40     sel_ldr_flags=['-e'],
41     # Don't hide output: We want the timings to be reported in the
42     # Buildbot logs so that Buildbot records the "RESULT" lines.
43     capture_output=False)
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')))