OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 Import('env') | 6 Import('env') |
7 | 7 |
8 # When testing the private-only nacl_secure_random(), we must link in | |
9 # a lot of dependencies and initialize libsrpc manually. | |
10 # TODO(mseaborn): Clean this up by removing irt_random.c's use of SRPC. | |
11 env.Append(CPPDEFINES=[['TESTS_USE_IRT', | |
12 str(int(env.Bit('tests_use_irt')))]]) | |
13 libs = [] | 8 libs = [] |
14 if not env.Bit('tests_use_irt'): | 9 if not env.Bit('tests_use_irt'): |
15 if env.Bit('nacl_glibc'): | 10 if env.Bit('nacl_glibc'): |
16 # libnacl_random_private depends on functions in irt_blockhook.c, | 11 # libnacl_random_private depends on functions in irt_blockhook.c, |
17 # which we don't have when building against nacl-glibc. | 12 # which we don't have when building against nacl-glibc. |
18 Return() | 13 Return() |
19 libs += ['libnacl_random_private', '${PTHREAD_LIBS}', 'srpc', | 14 libs += ['libnacl_random_private'] |
20 'platform', 'imc_syscalls'] | |
21 | 15 |
22 nexe = env.ComponentProgram( | 16 nexe = env.ComponentProgram( |
23 env.ProgramNameForNmf('random_test'), 'random_test.c', | 17 env.ProgramNameForNmf('random_test'), 'random_test.c', |
24 EXTRA_LIBS=libs + ['${NONIRT_LIBS}', '${TESTRUNNER_LIBS}', 'nacl']) | 18 EXTRA_LIBS=libs + ['${NONIRT_LIBS}', '${TESTRUNNER_LIBS}', 'nacl']) |
25 | 19 |
26 node = env.CommandSelLdrTestNacl('random_test.out', nexe, | 20 node = env.CommandSelLdrTestNacl('random_test.out', nexe, |
27 sel_ldr_flags=['-E', 'OUTSIDE_BROWSER=1']) | 21 sel_ldr_flags=['-E', 'OUTSIDE_BROWSER=1']) |
28 env.AddNodeToTestSuite(node, ['small_tests'], 'run_random_test') | 22 env.AddNodeToTestSuite(node, ['small_tests'], 'run_random_test') |
OLD | NEW |