Skip to content

Commit

Permalink
test: create temp dir in common.js
Browse files Browse the repository at this point in the history
For tests run outside the python harness (for example to
see console.error() messages for debugging), common.js
should create the testing temp directory if it does not
exist.
  • Loading branch information
Trott committed Jun 3, 2015
1 parent 8c71a92 commit 7830135
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ if (process.env.TEST_THREAD_ID) {
}
exports.tmpDir = path.join(exports.testDir, exports.tmpDirName);

// Create tmpDir if it does not exist
try {
fs.accessSync(exports.tmpDir);
} catch (err) {
fs.mkdirSync(exports.tmpDir);
}

var opensslCli = null;
var inFreeBSDJail = null;
var localhostIPv4 = null;
Expand Down

0 comments on commit 7830135

Please sign in to comment.