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

Side by Side Diff: tools/testing/run_selenium.py

Issue 9569003: Add token to stderr as well as stdout for batch processing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't revert status file change. Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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) 2011, the Dart project authors. Please see the AUTHORS file
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 7
8 """Script to actually open a browser and perform the test, and reports back with 8 """Script to actually open a browser and perform the test, and reports back with
9 the result. It uses Selenium WebDriver when possible for running the tests. It 9 the result. It uses Selenium WebDriver when possible for running the tests. It
10 uses Selenium RC for Safari. 10 uses Selenium RC for Safari.
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 % (current_browser_name, browser_name)) 235 % (current_browser_name, browser_name))
236 return 1 236 return 1
237 237
238 # Start the browser on the first run 238 # Start the browser on the first run
239 if browser is None: 239 if browser is None:
240 current_browser_name = browser_name 240 current_browser_name = browser_name
241 browser = start_browser(browser_name, html_out) 241 browser = start_browser(browser_name, html_out)
242 242
243 source = run_test_in_browser(browser, html_out, timeout, is_perf) 243 source = run_test_in_browser(browser, html_out, timeout, is_perf)
244 244
245 # Test is done. Write end token to stderr and flush.
246 sys.stderr.write('>>> EOF STDERR\n')
247 sys.stderr.flush()
248
245 # print one of: 249 # print one of:
246 # >>> TEST {PASS, FAIL, OK, CRASH, FAIL, TIMEOUT} 250 # >>> TEST {PASS, FAIL, OK, CRASH, FAIL, TIMEOUT}
247 status = report_results(is_perf, source) 251 status = report_results(is_perf, source)
248 if status == 0: 252 if status == 0:
249 print '>>> TEST PASS' 253 print '>>> TEST PASS'
250 elif source == TIMEOUT_ERROR_MSG: 254 elif source == TIMEOUT_ERROR_MSG:
251 print '>>> TEST TIMEOUT' 255 print '>>> TEST TIMEOUT'
252 else: 256 else:
253 print '>>> TEST FAIL' 257 print '>>> TEST FAIL'
254 sys.stdout.flush() 258 sys.stdout.flush()
(...skipping 12 matching lines...) Expand all
267 browser = start_browser(browser_name, html_out) 271 browser = start_browser(browser_name, html_out)
268 272
269 try: 273 try:
270 output = run_test_in_browser(browser, html_out, timeout, is_perf) 274 output = run_test_in_browser(browser, html_out, timeout, is_perf)
271 return report_results(is_perf, output) 275 return report_results(is_perf, output)
272 finally: 276 finally:
273 close_browser(browser) 277 close_browser(browser)
274 278
275 if __name__ == "__main__": 279 if __name__ == "__main__":
276 sys.exit(main(sys.argv)) 280 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698