Summary: | run-test.py script should make sure 'node_modules' directory exist before installing | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | dewei_zhu | ||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | aakash_jain, dewei_zhu, rniwa | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=182040 | ||||||
Attachments: |
|
Description
dewei_zhu
2018-01-18 12:41:06 PST
Created attachment 331651 [details]
Patch
This change causes unit-tests to fail as mkdir fails when the directory already exists. [~]$ tools/run-tests.py unit-tests Traceback (most recent call last): File "tools/run-tests.py", line 25, in <module> main() File "tools/run-tests.py", line 13, in main os.makedirs(node_modules_dir) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/Volume/Data/OpenSource/Websites/perf.webkit.org/node_modules' Referring to https://trac.webkit.org/changeset/227395/webkit Comment on attachment 331651 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331651&action=review > Websites/perf.webkit.org/tools/run-tests.py:13 > + os.makedirs(node_modules_dir) This fails when the directory already exists. Should check first if the directory exists. e.g.: if not os.path.exists(node_modules_dir): os.makedirs(node_modules_dir) Comment on attachment 331651 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331651&action=review >> Websites/perf.webkit.org/tools/run-tests.py:13 >> + os.makedirs(node_modules_dir) > > This fails when the directory already exists. Should check first if the directory exists. e.g.: > > if not os.path.exists(node_modules_dir): > os.makedirs(node_modules_dir) You are right. I'll land the fix. |