From e08a98fa43c4f970c0a5e2e611ce8553b2110082 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 2 Jun 2019 16:34:19 -0400 Subject: [PATCH] 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 Reviewed-By: Ruben Bridgewater Reviewed-By: Benjamin Gruenbaum Reviewed-By: Sam Roberts --- test/common/tmpdir.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/common/tmpdir.js b/test/common/tmpdir.js index ced957e5547bb9..33b2264a8d69f5 100644 --- a/test/common/tmpdir.js +++ b/test/common/tmpdir.js @@ -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 = {}) {