OLD | NEW |
(Empty) | |
| 1 # -*- python -*- |
| 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 |
| 4 # found in the LICENSE file. |
| 5 |
| 6 Import('env') |
| 7 |
| 8 |
| 9 # Exception handling support is only implemented for x86-32 Windows. |
| 10 is_broken = (not (env.Bit('host_windows') or env.Bit('host_mac')) or |
| 11 not env.Bit('build_x86_32')) |
| 12 |
| 13 # Don't build on anything other than x86-32 for now. |
| 14 if not env.Bit('build_x86_32'): |
| 15 Return() |
| 16 |
| 17 env.FilterOut(CCFLAGS=['-O2', '-fomit-frame-pointer']) |
| 18 env.Append(CCFLAGS=['-O0', '-fno-omit-frame-pointer', '-g']) |
| 19 |
| 20 untrusted_crash_dump_lib = env.ComponentLibrary( |
| 21 'untrusted_crash_dump_lib', |
| 22 'untrusted_crash_dump_lib.c', |
| 23 EXTRA_LIBS=['${PTHREAD_LIBS}', '${NONIRT_LIBS}'], |
| 24 COMPONENT_STATIC=not env.Bit('nacl_glibc')) |
| 25 |
| 26 untrusted_crash_dump_test = env.ComponentProgram( |
| 27 'untrusted_crash_dump_test', |
| 28 ['untrusted_crash_dump.c', 'untrusted_crash_dump_test.c'], |
| 29 EXTRA_LIBS=['untrusted_crash_dump_lib', |
| 30 '${PTHREAD_LIBS}', '${NONIRT_LIBS}']) |
| 31 |
| 32 if env.Bit('nacl_glibc'): |
| 33 golden = 'untrusted_crash_dump_test_glibc.golden' |
| 34 else: |
| 35 golden = 'untrusted_crash_dump_test_newlib.golden' |
| 36 golden = '$MAIN_DIR/tests/untrusted_crash_dump/' + golden |
| 37 |
| 38 dump_file = env.File('untrusted_crash_dump_test_core.json') |
| 39 processed = env.File('untrusted_crash_dump_test.trace').abspath |
| 40 node = env.CommandSelLdrTestNacl( |
| 41 'untrusted_crash_dump_test_run.out', |
| 42 untrusted_crash_dump_test, |
| 43 exit_status=166, |
| 44 sel_ldr_flags=['-e', '-a', '-E','NACLCOREFILE=' + dump_file.abspath]) |
| 45 env.SideEffect(dump_file, node) |
| 46 env.AddPostAction( |
| 47 node, env.UntrustedCrashDumpFilter( |
| 48 processed, dump_file.abspath, untrusted_crash_dump_test.abspath)) |
| 49 env.AddPostAction( |
| 50 node, env.GoldenFileCheckAction(processed, golden)) |
| 51 env.AddNodeToTestSuite( |
| 52 node, ['small_tests', 'exception_tests'], |
| 53 'run_untrusted_crash_dump_test', is_broken=is_broken) |
OLD | NEW |