Using segfault-handler to help debugging C++ crashes. (#1834)
* Using segfault-handler to help debugging C++ crashes. * Only use segfault-handler in node environments.
This commit is contained in:
parent
fa3e2c699b
commit
b0535cb2c2
|
@ -57,3 +57,4 @@ build.log.*
|
|||
realm-object-server/
|
||||
tests/react-test-app/ios/out.txt
|
||||
*.iml
|
||||
crash.log
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
const Realm = require('realm');
|
||||
|
||||
|
||||
if( typeof Realm.Sync !== 'undefined' && Realm.Sync !== null ) {
|
||||
global.WARNING = "global is not available in React Native. Use it only in tests";
|
||||
global.enableSyncTests = true;
|
||||
|
@ -34,6 +33,12 @@ if (isNodeProcess && process.platform === 'win32') {
|
|||
global.enableSyncTests = false;
|
||||
}
|
||||
|
||||
// catching segfaults during testing can help debugging
|
||||
if (isNodeProcess) {
|
||||
const SegfaultHandler = node_require('segfault-handler');
|
||||
SegfaultHandler.registerHandler("crash.log");
|
||||
}
|
||||
|
||||
var TESTS = {
|
||||
ListTests: require('./list-tests'),
|
||||
LinkingObjectsTests: require('./linkingobjects-tests'),
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"jasmine-console-reporter": "^1.2.7",
|
||||
"jasmine-reporters": "^2.2.0",
|
||||
"needle": "^1.3.0",
|
||||
"segfault-handler": "^1.0.1",
|
||||
"terminate": "^1.0.8",
|
||||
"tmp": "^0.0.30",
|
||||
"url-parse": "^1.1.7",
|
||||
|
|
Loading…
Reference in New Issue