OLD | NEW |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
Emily Fortuna
2012/10/09 22:17:16
It's October!! :-P
| |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 # Run to install the necessary components to run webdriver on the buildbots or | 7 # Run to install the necessary components to run webdriver on the buildbots or |
8 # on your local machine. | 8 # on your local machine. |
9 # Note: The setup steps can be done fairly easily by hand. This script is | 9 # Note: The setup steps can be done fairly easily by hand. This script is |
10 # intended to simply and reduce the time for setup since there are a fair number | 10 # intended to simply and reduce the time for setup since there are a fair number |
11 # of steps. | 11 # of steps. |
12 | 12 |
13 # TODO(efortuna): Rewrite this script in Dart when the Process module has a | 13 # TODO(efortuna): Rewrite this script in Dart when the Process module has a |
(...skipping 21 matching lines...) Expand all Loading... | |
35 print output | 35 print output |
36 if stderr: | 36 if stderr: |
37 print stderr | 37 print stderr |
38 | 38 |
39 def parse_args(): | 39 def parse_args(): |
40 parser = optparse.OptionParser() | 40 parser = optparse.OptionParser() |
41 parser.add_option('--firefox', '-f', dest='firefox', | 41 parser.add_option('--firefox', '-f', dest='firefox', |
42 help="Don't install Firefox", action='store_true', default=False) | 42 help="Don't install Firefox", action='store_true', default=False) |
43 parser.add_option('--chromedriver', '-c', dest='chromedriver', | 43 parser.add_option('--chromedriver', '-c', dest='chromedriver', |
44 help="Don't install chromedriver.", action='store_true', default=False) | 44 help="Don't install chromedriver.", action='store_true', default=False) |
45 parser.add_option('--iedriver', '-i', dest='iedriver', | |
46 help="Don't install iedriver (only used on Windows).", | |
47 action='store_true', default=False) | |
45 parser.add_option('--seleniumrc', '-s', dest='seleniumrc', | 48 parser.add_option('--seleniumrc', '-s', dest='seleniumrc', |
46 help="Don't install the Selenium RC server (used for Safari and Opera " | 49 help="Don't install the Selenium RC server (used for Safari and Opera " |
47 "tests).", action='store_true', default=False) | 50 "tests).", action='store_true', default=False) |
48 parser.add_option('--python', '-p', dest='python', | 51 parser.add_option('--python', '-p', dest='python', |
49 help="Don't install Selenium python bindings.", action='store_true', | 52 help="Don't install Selenium python bindings.", action='store_true', |
50 default=False) | 53 default=False) |
51 parser.add_option('--buildbot', '-b', dest='buildbot', action='store_true', | 54 parser.add_option('--buildbot', '-b', dest='buildbot', action='store_true', |
52 help='Perform a buildbot selenium setup (buildbots have a different' + | 55 help='Perform a buildbot selenium setup (buildbots have a different' + |
53 'location for their python executable).', default=False) | 56 'location for their python executable).', default=False) |
54 args, ignored = parser.parse_args() | 57 args, ignored = parser.parse_args() |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 args = parse_args() | 277 args = parse_args() |
275 if not args.python: | 278 if not args.python: |
276 SeleniumBindingsInstaller(args.buildbot).run() | 279 SeleniumBindingsInstaller(args.buildbot).run() |
277 if not args.chromedriver: | 280 if not args.chromedriver: |
278 GoogleCodeInstaller('chromedriver', | 281 GoogleCodeInstaller('chromedriver', |
279 find_depot_tools_location(args.buildbot), | 282 find_depot_tools_location(args.buildbot), |
280 lambda x: 'chromedriver_%(os)s_%(version)s.zip' % x).run() | 283 lambda x: 'chromedriver_%(os)s_%(version)s.zip' % x).run() |
281 if not args.seleniumrc: | 284 if not args.seleniumrc: |
282 GoogleCodeInstaller('selenium', os.path.dirname(os.path.abspath(__file__)), | 285 GoogleCodeInstaller('selenium', os.path.dirname(os.path.abspath(__file__)), |
283 lambda x: 'selenium-server-standalone-%(version)s.jar' % x).run() | 286 lambda x: 'selenium-server-standalone-%(version)s.jar' % x).run() |
287 if not args.iedriver and platform.system() == 'Windows': | |
288 GoogleCodeInstaller('selenium', find_depot_tools_location(args.buildbot), | |
289 lambda x: 'IEDriverServer_Win32_%(version)s.zip' % x).run() | |
284 | 290 |
285 if not args.firefox: | 291 if not args.firefox: |
286 FirefoxInstaller().run() | 292 FirefoxInstaller().run() |
287 | 293 |
288 if __name__ == '__main__': | 294 if __name__ == '__main__': |
289 main() | 295 main() |
OLD | NEW |