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

Unified Diff: chrome/test/webdriver/test/run_chromedriver_tests.py

Issue 8680018: Fix python scripts in src/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 1 month 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 | « chrome/test/webdriver/test/py_unittest_util.py ('k') | chrome/test/webdriver/test/run_webdriver_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/test/run_chromedriver_tests.py
diff --git a/chrome/test/webdriver/test/run_chromedriver_tests.py b/chrome/test/webdriver/test/run_chromedriver_tests.py
old mode 100644
new mode 100755
index 3f74afe0126172a435adca6febedf570ee6c4424..8d1aeff94507a5d337ed9f7651718676211d62ad
--- a/chrome/test/webdriver/test/run_chromedriver_tests.py
+++ b/chrome/test/webdriver/test/run_chromedriver_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -24,7 +24,7 @@ import chromedriver_tests
import py_unittest_util
-if __name__ == '__main__':
+def main():
parser = optparse.OptionParser()
parser.add_option(
'', '--filter', type='string', default='*',
@@ -47,10 +47,10 @@ if __name__ == '__main__':
if options.list is True:
print '\n'.join(py_unittest_util.GetTestNamesFromSuite(filtered_suite))
- sys.exit(0)
+ return 0
if sys.platform.startswith('darwin'):
print 'All tests temporarily disabled on mac, crbug.com/103434'
- sys.exit(0)
+ return 0
driver_exe = options.driver_exe
if driver_exe is not None:
@@ -61,4 +61,8 @@ if __name__ == '__main__':
ChromeDriverTest.GlobalSetUp(driver_exe, chrome_exe)
result = py_unittest_util.GTestTextTestRunner(verbosity=1).run(filtered_suite)
ChromeDriverTest.GlobalTearDown()
- sys.exit(not result.wasSuccessful())
+ return not result.wasSuccessful()
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « chrome/test/webdriver/test/py_unittest_util.py ('k') | chrome/test/webdriver/test/run_webdriver_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698