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

Unified Diff: ios/build/bots/scripts/test_runner.py

Issue 2767143003: Take desktop screenshots after test failures in test_runner.py. (Closed)
Patch Set: Created 3 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: ios/build/bots/scripts/test_runner.py
diff --git a/ios/build/bots/scripts/test_runner.py b/ios/build/bots/scripts/test_runner.py
index 0449975a659e57736ed07c701bab49faf2e297c7..c356109fb1fc787885c5fbc74a439f7be463decf 100644
--- a/ios/build/bots/scripts/test_runner.py
+++ b/ios/build/bots/scripts/test_runner.py
@@ -288,6 +288,7 @@ class TestRunner(object):
stderr=subprocess.STDOUT,
)
+ failed_test_count = len(parser.FailedTests())
while True:
line = proc.stdout.readline()
if not line:
@@ -297,6 +298,12 @@ class TestRunner(object):
print line
sys.stdout.flush()
+ # If there is a new test failure, take screenshot of desktop. This can
+ # help with debugging failures on the bots.
+ if len(parser.FailedTests()) > failed_test_count:
+ failed_test_count = len(parser.FailedTests())
+ self.screenshot_desktop()
smut 2017/03/22 22:46:54 parser is reinitialized every time (lines 279-282)
baxley 2017/03/22 23:24:39 Done.
baxley 2017/03/23 13:54:19 I don't think this works. parser is initialized ou
+
proc.wait()
sys.stdout.flush()
« 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