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

Unified Diff: tools/testing/webdriver_test_setup.py

Issue 10106012: Fix install script to deal with unzip for Windows. (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 6612)
+++ tools/testing/webdriver_test_setup.py (working copy)
@@ -20,6 +20,7 @@
import sys
import urllib
import urllib2
+import zipfile
def run_cmd(cmd, stdin=None):
"""Run the command on the command line in the shell. We print the output of
@@ -28,9 +29,11 @@
print cmd
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
stdin=subprocess.PIPE, shell=True)
- output, not_used = p.communicate(input=stdin)
+ output, stderr = p.communicate(input=stdin)
if output:
print output
+ if stderr:
+ print stderr
def parse_args():
parser = optparse.OptionParser()
@@ -131,8 +134,9 @@
urllib.urlretrieve(self.google_code_download() + '/' + download_name,
os.path.join(self.download_location, download_name))
if download_name.endswith('.zip'):
- run_cmd('unzip -u %s -d %s' % (os.path.join(self.download_location,
- download_name), self.download_location))
+ 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