OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 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 env.Bit('bitcode'): | 8 if env.Bit('bitcode'): |
9 # Preserve debugging info (which is not ABI-stable under PNaCl). | 9 # Preserve debugging info (which is not ABI-stable under PNaCl). |
10 env.SetBits('nonstable_bitcode') | 10 env.SetBits('nonstable_bitcode') |
11 if env.Bit('skip_nonstable_bitcode'): | 11 if env.Bit('skip_nonstable_bitcode'): |
12 Return() | 12 Return() |
13 | 13 |
| 14 # Add a build ID to the nexe in the cases where this works. |
| 15 # TODO(mseaborn): Make "--build-id" work with the other toolchains. |
| 16 # * In the x86 nacl-gcc toolchain, "--build-id" produces a nexe that |
| 17 # sel_ldr won't load. |
| 18 # * pnacl-ld rejects "--build-id". |
| 19 if env.Bit('build_arm') and not env.Bit('bitcode'): |
| 20 env.Append(LINKFLAGS=['-Wl,--build-id']) |
| 21 |
14 nexe = env.ComponentProgram('minidump_test', 'minidump_test.c', | 22 nexe = env.ComponentProgram('minidump_test', 'minidump_test.c', |
15 EXTRA_LIBS=['minidump_generator']) | 23 EXTRA_LIBS=['minidump_generator']) |
16 | 24 |
17 # Note that this doesn't check the crash dump that is produced yet. | 25 # Note that this doesn't check the crash dump that is produced yet. |
18 # TODO(mseaborn): Test that Breakpad can extract a stack backtrace. | 26 # TODO(mseaborn): Test that Breakpad can extract a stack backtrace. |
19 output_dump_file = env.File('minidump.dmp') | 27 output_dump_file = env.File('minidump.dmp') |
20 node = env.CommandSelLdrTestNacl( | 28 node = env.CommandSelLdrTestNacl( |
21 'minidump_test.out', nexe, [output_dump_file.abspath], | 29 'minidump_test.out', nexe, [output_dump_file.abspath], |
22 declares_exit_status=True, | 30 declares_exit_status=True, |
23 sel_ldr_flags=['-e', # Enable exception handling for catching crash | 31 sel_ldr_flags=['-e', # Enable exception handling for catching crash |
24 '-a', # Enable file access for writing minidump file | 32 '-a', # Enable file access for writing minidump file |
25 ]) | 33 ]) |
26 env.AddNodeToTestSuite(node, ['small_tests', 'exception_tests'], | 34 env.AddNodeToTestSuite(node, ['small_tests', 'exception_tests'], |
27 'run_minidump_test') | 35 'run_minidump_test') |
OLD | NEW |