Skip to content

Commit 7830135

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 7830135

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/common.js

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ 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+
try {
25+
fs.accessSync(exports.tmpDir);
26+
} catch (err) {
27+
fs.mkdirSync(exports.tmpDir);
28+
}
29+
2330
var opensslCli = null;
2431
var inFreeBSDJail = null;
2532
var localhostIPv4 = null;

0 commit comments

Comments
 (0)