Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use realpath for NODE_TEST_DIR in common.js #10723

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ Synchronous version of `spawnPwd`.
### tmpDir
* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)

Path to the 'tmp' directory.
The realpath of the 'tmp' directory.

### tmpDirName
* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)
Expand Down
2 changes: 1 addition & 1 deletion test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Timer = process.binding('timer_wrap').Timer;
const execSync = require('child_process').execSync;

const testRoot = process.env.NODE_TEST_DIR ?
path.resolve(process.env.NODE_TEST_DIR) : __dirname;
fs.realpathSync(process.env.NODE_TEST_DIR) : __dirname;

exports.fixturesDir = path.join(__dirname, 'fixtures');
exports.tmpDirName = 'tmp';
Expand Down
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1628,9 +1628,9 @@ def Main():

tempdir = os.environ.get('NODE_TEST_DIR') or options.temp_dir
if tempdir:
os.environ['NODE_TEST_DIR'] = tempdir
try:
os.makedirs(tempdir)
os.environ['NODE_TEST_DIR'] = tempdir
except OSError as exception:
if exception.errno != errno.EEXIST:
print "Could not create the temporary directory", options.temp_dir
Expand Down