Skip to content

Commit d93b108

Browse files
committed
test: create temp dir in common.js
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.
1 parent 8c71a92 commit d93b108

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/common.js

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ if (process.env.TEST_THREAD_ID) {
2020
}
2121
exports.tmpDir = path.join(exports.testDir, exports.tmpDirName);
2222

23+
// Create tmpDir if it does not exist
24+
if (! fs.existsSync(exports.tmpDir)) {
25+
fs.mkdirSync(exports.tmpDir);
26+
}
27+
2328
var opensslCli = null;
2429
var inFreeBSDJail = null;
2530
var localhostIPv4 = null;

0 commit comments

Comments
 (0)