diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-12-05 23:55:17 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-12-06 02:37:30 +0100 |
commit | b928303d83859a0dfa7c83b317b93a3a13b78ee2 (patch) | |
tree | 040824d41b6b223d1f0f0570a6d81ea69faa14ef /test/pummel/test-abort-fatal-error.js | |
parent | 2931348372c5670e5d0d3f36ff62f17148f05d3e (diff) | |
download | android-node-v8-b928303d83859a0dfa7c83b317b93a3a13b78ee2.tar.gz android-node-v8-b928303d83859a0dfa7c83b317b93a3a13b78ee2.tar.bz2 android-node-v8-b928303d83859a0dfa7c83b317b93a3a13b78ee2.zip |
test: move simple/test-abort-fatal-error to pummel
Move it from simple/ to pummel/ because it can take an awful long to
run to completion:
$ time out/x64.release/node test/simple/test-abort-fatal-error.js
real 0m8.150s
user 0m0.328s
sys 0m0.054s
PR-URL: https://github.com/node-forward/node/pull/91
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/pummel/test-abort-fatal-error.js')
-rw-r--r-- | test/pummel/test-abort-fatal-error.js | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/pummel/test-abort-fatal-error.js b/test/pummel/test-abort-fatal-error.js new file mode 100644 index 0000000000..79e3d72e86 --- /dev/null +++ b/test/pummel/test-abort-fatal-error.js @@ -0,0 +1,50 @@ +// Copyright Joyent, Inc. and other Node contributors. + +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: + +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var assert = require('assert'); +var common = require('../common'); + +if (process.platform === 'win32') { + console.log('skipping test on windows'); + process.exit(0); +} + +var exec = require('child_process').exec; + +var cmdline = 'ulimit -c 0; ' + process.execPath; +cmdline += ' --max-old-space-size=4 --max-semi-space-size=1'; +cmdline += ' -e "a = []; for (i = 0; i < 1e9; i++) { a.push({}) }"'; + +exec(cmdline, function(err, stdout, stderr) { + if (!err) { + console.log(stdout); + console.log(stderr); + assert(false, 'this test should fail'); + return; + } + + if (err.code !== 134 && err.signal !== 'SIGABRT') { + console.log(stdout); + console.log(stderr); + console.log(err); + assert(false, err); + } +}); |