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 if not env.AllowInlineAssembly(): | 8 if not env.AllowInlineAssembly(): |
9 Return() | 9 Return() |
10 | 10 |
| 11 env.Append(CPPDEFINES=[['NONSFI_MODE', |
| 12 str(int(env.Bit('nonsfi_nacl')))]]) |
| 13 env.Append(CPPDEFINES=[['TESTS_USE_IRT', |
| 14 str(int(env.Bit('tests_use_irt')))]]) |
| 15 |
11 test_args = {'sel_ldr_flags': ['-e', '-E', 'OUTSIDE_BROWSER=1'], | 16 test_args = {'sel_ldr_flags': ['-e', '-E', 'OUTSIDE_BROWSER=1'], |
12 'declares_exit_status': True} | 17 'declares_exit_status': True} |
13 if env.Bit('target_arm') and env.UsingEmulator(): | 18 if env.Bit('target_arm') and env.UsingEmulator(): |
14 test_args['sel_ldr_flags'].extend(['-E', 'UNDER_QEMU_ARM=1']) | 19 test_args['sel_ldr_flags'].extend(['-E', 'UNDER_QEMU_ARM=1']) |
15 | 20 |
16 helper_files = [] | 21 helper_files = [] |
17 if env.Bit('target_x86'): | 22 if env.Bit('target_x86') and not env.Bit('nonsfi_nacl'): |
| 23 # TODO(uekawa): Enable for Non-SFI. |
18 helper_files.append('direction_flag_x86.S') | 24 helper_files.append('direction_flag_x86.S') |
19 exception_test = env.ComponentProgram( | 25 exception_test = env.ComponentProgram( |
20 env.ProgramNameForNmf('exception_test'), | 26 env.ProgramNameForNmf('exception_test'), |
21 ['exception_test.c'] + helper_files, | 27 ['exception_test.c'] + helper_files, |
22 EXTRA_LIBS=['${NONIRT_LIBS}', '${PTHREAD_LIBS}', '${TESTRUNNER_LIBS}', | 28 EXTRA_LIBS=['${NONIRT_LIBS}', '${PTHREAD_LIBS}', '${TESTRUNNER_LIBS}', |
23 '${EXCEPTION_LIBS}', 'test_common']) | 29 '${EXCEPTION_LIBS}', 'test_common']) |
24 | 30 |
25 node = env.CommandSelLdrTestNacl( | 31 node = env.CommandSelLdrTestNacl( |
26 'exception_test.out', exception_test, **test_args) | 32 'exception_test.out', exception_test, **test_args) |
27 env.AddNodeToTestSuite( | 33 env.AddNodeToTestSuite( |
(...skipping 25 matching lines...) Expand all Loading... |
53 'exceptions_disabled_test', | 59 'exceptions_disabled_test', |
54 ['exceptions_disabled_test.c'], | 60 ['exceptions_disabled_test.c'], |
55 EXTRA_LIBS=['${NONIRT_LIBS}', '${EXCEPTION_LIBS}']) | 61 EXTRA_LIBS=['${NONIRT_LIBS}', '${EXCEPTION_LIBS}']) |
56 node = env.CommandSelLdrTestNacl( | 62 node = env.CommandSelLdrTestNacl( |
57 'exceptions_disabled_test.out', | 63 'exceptions_disabled_test.out', |
58 exceptions_disabled_test, [], | 64 exceptions_disabled_test, [], |
59 declares_exit_status=True) | 65 declares_exit_status=True) |
60 env.AddNodeToTestSuite( | 66 env.AddNodeToTestSuite( |
61 node, ['small_tests', 'exception_tests'], | 67 node, ['small_tests', 'exception_tests'], |
62 'run_exceptions_disabled_test') | 68 'run_exceptions_disabled_test') |
OLD | NEW |