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

Unified Diff: chrome/test/chromedriver/run_java_tests.py

Issue 14130017: [chromedriver] Add option to relaunch the test harness after each java test for debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed nits Created 7 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 | « chrome/test/chromedriver/java_tests.txt ('k') | chrome/test/chromedriver/test_environment.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/run_java_tests.py
diff --git a/chrome/test/chromedriver/run_java_tests.py b/chrome/test/chromedriver/run_java_tests.py
index aa51a009744729495b1d9e4704a42356a9bef202..6ab87883de9a15fe125aef024ea8f72e55f256b1 100755
--- a/chrome/test/chromedriver/run_java_tests.py
+++ b/chrome/test/chromedriver/run_java_tests.py
@@ -240,6 +240,9 @@ def main():
'', '--filter', type='string', default=None,
help='Filter for specifying what tests to run, "*" will run all. E.g., '
'*testShouldReturnTitleOfPageIfSet')
+ parser.add_option(
+ '', '--isolate-tests', action='store_true', default=False,
+ help='Relaunch the jar test harness after each test')
options, args = parser.parse_args()
if options.chromedriver is None or not os.path.exists(options.chromedriver):
@@ -257,9 +260,13 @@ def main():
try:
environment.GlobalSetUp()
# Run passed tests when filter is not provided.
- test_filter = options.filter
- if test_filter is None:
- test_filter = environment.GetPassedJavaTestFilter()
+ if options.filter:
+ test_filters = [options.filter]
+ else:
+ if options.isolate_tests:
+ test_filters = environment.GetPassedJavaTests()
+ else:
+ test_filters = [environment.GetPassedJavaTestFilter()]
java_tests_src_dir = os.path.join(chrome_paths.GetSrc(), 'chrome', 'test',
'chromedriver', 'third_party',
@@ -270,14 +277,17 @@ def main():
'Should add "deps/third_party/webdriver" to source checkout config')
return 1
- return PrintTestResults(_Run(
- java_tests_src_dir=java_tests_src_dir,
- test_filter=test_filter,
- chromedriver_path=options.chromedriver,
- chrome_path=options.chrome,
- android_package=options.android_package,
- verbose=options.verbose,
- debug=options.debug))
+ results = []
+ for filter in test_filters:
+ results += _Run(
+ java_tests_src_dir=java_tests_src_dir,
+ test_filter=filter,
+ chromedriver_path=options.chromedriver,
+ chrome_path=options.chrome,
+ android_package=options.android_package,
+ verbose=options.verbose,
+ debug=options.debug)
+ return PrintTestResults(results)
finally:
environment.GlobalTearDown()
« no previous file with comments | « chrome/test/chromedriver/java_tests.txt ('k') | chrome/test/chromedriver/test_environment.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698