Chromium Code Reviews| 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() |