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

Unified Diff: tools/testing/webdriver_test_setup.py

Issue 10082031: Fix auto-install script to properly install on 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 6545)
+++ tools/testing/webdriver_test_setup.py (working copy)
@@ -57,7 +57,6 @@
depot_tools = os.path.join('b', 'depot_tools')
if 'win32' in sys.platform or 'cygwin' in sys.platform:
depot_tools = os.path.join('e:', depot_tools)
- depot_tools = '/Users/efortuna'
Emily Fortuna 2012/04/13 23:59:04 Super huge yikes here! I'm guessing this was a str
return depot_tools
else:
path = os.environ['PATH'].split(os.pathsep)
@@ -210,18 +209,27 @@
print 'Installing Selenium Python Bindings'
admin_keyword = ''
python_cmd = 'python'
+ pip_cmd = 'pip'
if 'win32' not in sys.platform and 'cygwin' not in sys.platform:
admin_keyword = 'sudo'
else:
# The python installation is "special" on Windows buildbots.
if self.is_buildbot:
- python_cmd = os.path.join(find_depot_tools_location(self.is_buildbot),
- 'python-bin', 'python')
+ python_loc = os.path.join(
+ find_depot_tools_location(self.is_buildbot), 'python-bin')
+ python_cmd = os.path.join(python_loc, 'python')
+ pip_cmd = os.path.join(python_loc, 'Scripts', pip_cmd)
+ else:
+ path = os.environ['PATH'].split(os.pathsep)
+ for loc in path:
+ if 'python' in loc or 'Python' in loc:
+ pip_cmd = os.path.join(loc, 'Scripts', pip_cmd)
+ break
page = urllib2.urlopen(self.SETUPTOOLS_SITE)
run_cmd('%s %s' % (admin_keyword, python_cmd), page.read())
page = urllib2.urlopen(self.PIP_SITE)
run_cmd('%s %s' % (admin_keyword, python_cmd), page.read())
- run_cmd('%s pip install -U selenium' % admin_keyword)
+ run_cmd('%s %s install -U selenium' % (admin_keyword, pip_cmd))
def main():
args = parse_args()
@@ -231,7 +239,7 @@
chromedriver_loc = args.path
GoogleCodeInstaller('chromedriver', chromedriver_loc,
lambda x: 'chromedriver_%(os)s_%(version)s.zip' % x).run()
- if 'darwin' in sys.platform:
+ if 'win32' not in sys.platform and 'cygwin' not in sys.platform:
GoogleCodeInstaller('selenium', os.path.dirname(os.path.abspath(__file__)),
lambda x: 'selenium-server-standalone-%(version)s.jar' % x).run()
« 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