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: https://github.com/nodejs/node/pull/28035 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This commit is contained in:
parent
59f666cd39
commit
9032ab4763
@ -89,11 +89,7 @@ const testRoot = process.env.NODE_TEST_DIR ?
|
|||||||
|
|
||||||
// Using a `.` prefixed name, which is the convention for "hidden" on POSIX,
|
// Using a `.` prefixed name, which is the convention for "hidden" on POSIX,
|
||||||
// gets tools to ignore it by default or by simple rules, especially eslint.
|
// gets tools to ignore it by default or by simple rules, especially eslint.
|
||||||
let tmpdirName = '.tmp';
|
const tmpdirName = '.tmp.' + (process.env.TEST_THREAD_ID || '0');
|
||||||
if (process.env.TEST_THREAD_ID) {
|
|
||||||
tmpdirName += `.${process.env.TEST_THREAD_ID}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
const tmpPath = path.join(testRoot, tmpdirName);
|
const tmpPath = path.join(testRoot, tmpdirName);
|
||||||
|
|
||||||
function refresh(opts = {}) {
|
function refresh(opts = {}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user