Skip to content

Commit d74678e

Browse files
committed
Make crash dump tests runnable
Like upstream, you must pass a breakpad_tools_dir argument for the tests to run. Unlike upstream, the Breakpad #includes will be looked for also in the tools dir, instead of the Chromium code depot.
1 parent 3672596 commit d74678e

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ scons --mode=nacl saigo=1 platform=x86-64 irt_core_raw [optional saigo_newlib_di
2929
This builds both components and runs some tests.
3030
```
3131
scons --mode=opt-host,nacl saigo=1 platform=x86-64 --keep-going small_tests medium_tests
32+
33+
To enable crash dump tests, add the option `breakpad_tools_dir=<path to breakpad>`. The
34+
repository can be found at `daemon/libs/breakpad`. You need to have built the Breakpad
35+
tools in-source.
3236
```
3337
---
3438

src/untrusted/minidump_generator/minidump_generator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include <algorithm>
2727

28-
#include "breakpad/src/google_breakpad/common/minidump_format.h"
28+
#include "google_breakpad/common/minidump_format.h"
2929
#if !DYNAMIC_LOADING_SUPPORT
3030
# include "native_client/src/include/elf_constants.h"
3131
#endif

src/untrusted/minidump_generator/nacl.scons

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
Import('env')
77

8+
# DAEMON: use the same dir as Breakpad tools for Breakpad includes
89
# Allow Breakpad headers to #include other Breakpad headers.
9-
env.Append(CPPPATH=['${SOURCE_ROOT}/breakpad/src'])
10+
env.Append(CPPPATH=['${BREAKPAD_TOOLS_DIR}/src'])
1011
# Breakpad's headers do not compile with "-pedantic".
1112
env.FilterOut(CCFLAGS=['-pedantic'])
1213

tests/untrusted_minidump/nacl.scons

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Import('env')
1010
if not env.SetNonStableBitcodeIfAllowed():
1111
Return()
1212

13+
if env.get('BREAKPAD_TOOLS_DIR') is None:
14+
Return() # DAEMON: avoid building minidump_generator
15+
1316
if env.Bit('bitcode'):
1417
# With the PNaCl toolchain, special flags are required to get a build ID.
1518
env.Append(LINKFLAGS=['--pnacl-allow-nexe-build-id'])

0 commit comments

Comments
 (0)