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 be
4 # found in the LICENSE file.
10 nexe = env.ComponentProgram('untrusted_check_test',
11 ['untrusted_check_test.c'],
12 EXTRA_LIBS=['platform',
17 # nacl-newlib and nacl-glibc's abort() implementations produce
18 # different exit codes.
19 if env.Bit('nacl_glibc'):
20 expected_exit_status = 'untrusted_sigsegv'
22 # abort() from libnacl exits via __builtin_trap().
23 expected_exit_status = 'untrusted_builtin_trap'
25 # Valgrind and ASan interfere with the exit status
26 testing_on_asan_or_valgrind = (env.Bit('running_on_valgrind') or
28 node = env.CommandSelLdrTestNacl(
29 'untrusted_check_test.out',
31 # On Windows, PNaCl gives an absolute cygwin-style path
32 filter_regex = ('"(Fatal error in file ).*(untrusted_check_test.c)'
35 filter_group_only = 'true',
36 stderr_golden = env.File('untrusted_check_test.stderr'),
37 exit_status=expected_exit_status)
39 env.AddNodeToTestSuite(node, ['small_tests'], 'run_untrusted_check_test',
40 is_broken=testing_on_asan_or_valgrind)