run-test.py script should make sure 'node_modules' directory exist before installing
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.