Skip to content

Commit

Permalink
test: fix temp-dir option in tools/test.py
Browse files Browse the repository at this point in the history
If a temp-dir is specified and already exists, the NODE_TEST_DIR
environment variable will never be set. This fixes 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]>
  • Loading branch information
gibfahn authored and MylesBorins committed Mar 9, 2017
1 parent 9abde3a commit 6e7dfb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1672,9 +1672,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

0 comments on commit 6e7dfb1

Please sign in to comment.