Skip to content

Commit 2d11421

Browse files
committed
tools: remove unneeded temp directory handling
The handling of temp directory creation happens in common.js now so there is no need to test the creation of the temp directory in test.py.
1 parent 7c9a691 commit 2d11421

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

tools/test.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,15 +1562,8 @@ def Main():
15621562
for rule in globally_unused_rules:
15631563
print "Rule for '%s' was not used." % '/'.join([str(s) for s in rule.path])
15641564

1565-
tempdir = os.environ.get('NODE_TEST_DIR') or options.temp_dir
1566-
if tempdir:
1567-
try:
1568-
os.makedirs(tempdir)
1569-
os.environ['NODE_TEST_DIR'] = tempdir
1570-
except OSError as exception:
1571-
if exception.errno != errno.EEXIST:
1572-
print "Could not create the temporary directory", options.temp_dir
1573-
sys.exit(1)
1565+
if not os.environ.get('NODE_TEST_DIR') and options.temp_dir:
1566+
os.environ['NODE_TEST_DIR'] = options.temp_dir
15741567

15751568
if options.report:
15761569
PrintReport(all_cases)

0 commit comments

Comments
 (0)