Skip to content

Commit e08a98f

Browse files
refackBridgeAR
authored andcommitted
test: always suffix tmpdir
This makes temp dir names consistent whether we run in stand-alone mode, via `test.py` in single process, or in multi-process. PR-URL: #28035 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
1 parent f336236 commit e08a98f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/common/tmpdir.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ const testRoot = process.env.NODE_TEST_DIR ?
8989

9090
// Using a `.` prefixed name, which is the convention for "hidden" on POSIX,
9191
// gets tools to ignore it by default or by simple rules, especially eslint.
92-
let tmpdirName = '.tmp';
93-
if (process.env.TEST_THREAD_ID) {
94-
tmpdirName += `.${process.env.TEST_THREAD_ID}`;
95-
}
96-
92+
const tmpdirName = '.tmp.' + (process.env.TEST_THREAD_ID || '0');
9793
const tmpPath = path.join(testRoot, tmpdirName);
9894

9995
function refresh(opts = {}) {

0 commit comments

Comments
 (0)