Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: tools/testing/webdriver_test_setup.py

Issue 10239011: Fix webdriver_test_setup script for installing with correct permissions on nonWindows machines. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/webdriver_test_setup.py
===================================================================
--- tools/testing/webdriver_test_setup.py (revision 7032)
+++ tools/testing/webdriver_test_setup.py (working copy)
@@ -134,9 +134,16 @@
urllib.urlretrieve(self.google_code_download() + '/' + download_name,
os.path.join(self.download_location, download_name))
if download_name.endswith('.zip'):
- z = zipfile.ZipFile(os.path.join(self.download_location, download_name))
- z.extractall(self.download_location)
- z.close()
+ if platform.system() != 'Windows':
+ # The Python zip utility does not preserve executable permissions, but
+ # this does not seem to be a problem for Windows, which does not have a
+ # built in zip utility. :-/
+ run_cmd('unzip -u %s -d %s' % (os.path.join(self.download_location,
+ download_name), self.download_location))
+ else:
+ z = zipfile.ZipFile(os.path.join(self.download_location, download_name))
+ z.extractall(self.download_location)
+ z.close()
os.remove(os.path.join(self.download_location, download_name))
@property
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698