Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
fix failing test on linux
Browse files Browse the repository at this point in the history
The GNU shell returns a code and no signal if it gets a SIGSEGV
signal, so we have to skip this. Hat tip to @tjfontaine
  • Loading branch information
robertkowalski committed Feb 17, 2014
1 parent 3850441 commit ba38256
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/tap/lifecycle-signal.js
Expand Up @@ -8,10 +8,19 @@ var pkg = path.resolve(__dirname, "lifecycle-signal")
test("lifecycle signal abort", function (t) {
// windows does not use lifecycle signals, abort
if (process.platform === "win32") return t.end()


var child = spawn(node, [npm, "install"], {
cwd: pkg
})
child.on("close", function (code, signal) {
// GNU shell returns a code, no signal
if (process.platform === "linux") {
t.equal(code, 1)
t.equal(signal, null)
return t.end()
}

t.equal(code, null)
t.equal(signal, "SIGSEGV")
t.end()
Expand Down

0 comments on commit ba38256

Please sign in to comment.