Skip to content

Commit

Permalink
test: always suffix tmpdir
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
refack committed Jun 6, 2019
1 parent 59f666c commit 9032ab4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/common/tmpdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ const testRoot = process.env.NODE_TEST_DIR ?

// 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.
let tmpdirName = '.tmp';
if (process.env.TEST_THREAD_ID) {
tmpdirName += `.${process.env.TEST_THREAD_ID}`;
}

const tmpdirName = '.tmp.' + (process.env.TEST_THREAD_ID || '0');
const tmpPath = path.join(testRoot, tmpdirName);

function refresh(opts = {}) {
Expand Down

0 comments on commit 9032ab4

Please sign in to comment.