OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2011 The Native Client Authors. All rights reserved. | 2 # Copyright 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 | 7 |
8 Import('env') | 8 Import('env') |
9 | 9 |
10 nexe = env.ComponentProgram('untrusted_check_test', | 10 nexe = env.ComponentProgram('untrusted_check_test', |
11 ['untrusted_check_test.c'], | 11 ['untrusted_check_test.c'], |
12 EXTRA_LIBS=['platform', | 12 EXTRA_LIBS=['platform', |
13 'gio', | 13 'gio', |
14 'pthread']) | 14 'pthread']) |
15 | 15 |
16 # nacl-newlib and nacl-glibc's abort() implementations produce | 16 # nacl-newlib and nacl-glibc's abort() implementations produce |
17 # different exit codes. | 17 # different exit codes. |
18 if env.Bit('nacl_glibc'): | 18 if env.Bit('nacl_glibc'): |
19 expected_exit_status = 'untrusted_sigill' | 19 expected_exit_status = 'untrusted_sigill' |
20 else: | 20 else: |
21 expected_exit_status = '1' | 21 expected_exit_status = '1' |
22 | 22 |
23 node = env.CommandSelLdrTestNacl( | 23 node = env.CommandSelLdrTestNacl( |
24 'untrusted_check_test.out', | 24 'untrusted_check_test.out', |
25 nexe, | 25 nexe, |
26 filter_regex = ('"(Fatal error in file[^/\\\\\\\\]*)' | 26 # On Windows, PNaCl gives an absolute cygwin-style path |
| 27 filter_regex = ('"(Fatal error in file ).*(untrusted_check_test.c)' |
27 '|(LOG_FATAL.*)' | 28 '|(LOG_FATAL.*)' |
28 '|(Log output.*)"'), | 29 '|(Log output.*)"'), |
29 filter_group_only = 'true', | 30 filter_group_only = 'true', |
30 stderr_golden = env.File('untrusted_check_test.stderr'), | 31 stderr_golden = env.File('untrusted_check_test.stderr'), |
31 exit_status=expected_exit_status) | 32 exit_status=expected_exit_status) |
32 | 33 |
33 env.AddNodeToTestSuite(node, ['small_tests'], 'run_untrusted_check_test') | 34 env.AddNodeToTestSuite(node, ['small_tests'], 'run_untrusted_check_test') |
OLD | NEW |