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 <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
  • Loading branch information
refack authored and BridgeAR committed Jun 17, 2019
1 parent f336236 commit e08a98f
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 e08a98f

Please sign in to comment.