Skip to content

Commit 9abde3a

Browse files
gibfahnMylesBorins
authored andcommitted
test: use realpath for NODE_TEST_DIR in common.js
If you don't specify NODE_TEST_DIR, common.tmpDir will resolve to the realpath of `node/test`. If you do specify NODE_TEST_DIR (with the environment variable or by running or by running tools/test.py --test-dir=x), common.tmpDir (which is resolved from testRoot) uses the symbolic path (doesn't resolve symlinks). This uses fs.realpathSync() to fix that. PR-URL: #10723 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 626875f commit 9abde3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const stream = require('stream');
99
const util = require('util');
1010

1111
const testRoot = process.env.NODE_TEST_DIR ?
12-
path.resolve(process.env.NODE_TEST_DIR) : __dirname;
12+
fs.realpathSync(process.env.NODE_TEST_DIR) : __dirname;
1313

1414
exports.testDir = __dirname;
1515
exports.fixturesDir = path.join(exports.testDir, 'fixtures');

0 commit comments

Comments
 (0)