| 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..23d612487974feff00c7262ff0c643887d9ed18d 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,
|
| )
|
|
|
| + failure_count = 0
|
| while True:
|
| line = proc.stdout.readline()
|
| if not line:
|
| @@ -297,6 +298,16 @@ class TestRunner(object):
|
| print line
|
| sys.stdout.flush()
|
|
|
| + # If there is a new test failure, take a desktop screenshot.
|
| + # parser.FailedTests() considers in progress tests as failed, so a check
|
| + # is needed that the current test isn't included in the list of failed
|
| + # tests.
|
| + new_failure_count = len([test for test in parser.FailedTests()
|
| + if test != parser.GetCurrentTest()])
|
| + if (new_failure_count > failure_count):
|
| + self.screenshot_desktop()
|
| + failure_count = new_failure_count
|
| +
|
| proc.wait()
|
| sys.stdout.flush()
|
|
|
|
|