Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c5bc5c
commit cf1dbc9
Showing
9 changed files
with
59 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
/* eslint-disable no-octal */ | ||
// vim: expandtab:ts=2:sw=2 | ||
|
||
var | ||
fs = require('fs'), | ||
tmp = require('../../lib/tmp'), | ||
// we reuse the fixtures from issue62 here | ||
fixture = require('./issue62'); | ||
|
||
tmp.setGracefulCleanup(); | ||
const | ||
tmp = require('../../lib/tmp'); | ||
|
||
// https://github.com/raszi/node-tmp/issues/121 | ||
module.exports = function (signal) { | ||
fixture.apply(this, [tmp.dirSync({ unsafeCleanup: true }), tmp]); | ||
module.exports = function () { | ||
|
||
tmp.setGracefulCleanup(); | ||
|
||
const result = tmp.dirSync({ unsafeCleanup: true }); | ||
|
||
// make sure that the process keeps running | ||
setTimeout(function () {}, 1000000); | ||
this.out(result.name, function () { }); | ||
|
||
this.kill(signal); | ||
setTimeout(function () { | ||
throw new Error('ran into timeout'); | ||
}, 10000); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"graceful": true, | ||
"tc": "issue121" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// vim: expandtab:ts=2:sw=2 | ||
|
||
var | ||
path = require('path'), | ||
readJsonConfig = require('./util').readJsonConfig, | ||
spawn = require('./spawn'); | ||
|
||
var config = readJsonConfig(process.argv[2]); | ||
var signal = process.argv[3]; | ||
spawn.graceful = !!config.graceful; | ||
|
||
// import the test case function and execute it | ||
var fn = require(path.join(__dirname, 'outband', config.tc)); | ||
fn.apply(spawn); | ||
|
||
spawn.kill(signal); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters