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

Unified Diff: testing/chromoting/browser_tests_launcher.py

Issue 1016273004: Include host-logs in browser-test results even if all tests pass. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/chromoting/browser_tests_launcher.py
diff --git a/testing/chromoting/browser_tests_launcher.py b/testing/chromoting/browser_tests_launcher.py
index a265f56c389a283a7f66940d35f589f79c38819f..ee1fe382ea0e53d86cb4aef955d61e748fcc10d5 100644
--- a/testing/chromoting/browser_tests_launcher.py
+++ b/testing/chromoting/browser_tests_launcher.py
@@ -164,16 +164,18 @@ def main():
line = line.replace(PROD_DIR_ID, args.prod_dir)
LaunchBTCommand(line)
+ # All tests completed. Include host-logs in the test results.
+ host_log_contents = ''
+ # There should be only 1 log file, as we delete logs on test completion.
+ # Loop through matching files, just in case there are more.
+ for log_file in glob.glob('/tmp/chrome_remote_desktop_*'):
+ with open(log_file, 'r') as log:
+ host_log_contents += '\nHOST LOG %s\n CONTENTS:\n%s' % (
+ log_file, log.read())
+ print host_log_contents
+
# Was there any test failure?
if TEST_FAILURE:
- # Obtain contents of Chromoting host logs.
- log_contents = ''
- # There should be only 1 log file, as we delete logs on test completion.
- # Loop through matching files, just in case there are more.
- for log_file in glob.glob('/tmp/chrome_remote_desktop_*'):
- with open(log_file, 'r') as log:
- log_contents += '\nHOST LOG %s\n CONTENTS:\n%s' % (log_file, log.read())
- print log_contents
raise Exception('At least one test failed.')
# Now, stop host, and cleanup user-profile-dir
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698