From 7d255839b57a48546408206a8598ce29fa0fe2c3 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Sat, 3 Nov 2012 17:10:59 +0000 Subject: [PATCH] Bug 757838 - Make b2gautomation.py set lastTestSeen so crashes are output with the test filename; r=jgriffin --- build/mobile/b2gautomation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/mobile/b2gautomation.py b/build/mobile/b2gautomation.py index 98d470778a3..9288476fcf8 100644 --- a/build/mobile/b2gautomation.py +++ b/build/mobile/b2gautomation.py @@ -48,6 +48,7 @@ class B2GRemoteAutomation(Automation): # Default our product to b2g self._product = "b2g" + self.lastTestSeen = "b2gautomation.py" # Default log finish to mochitest standard self.logFinish = 'INFO SimpleTest FINISHED' Automation.__init__(self) @@ -137,6 +138,12 @@ class B2GRemoteAutomation(Automation): if currentlog: responseDueBy = time.time() + timeout print currentlog + # Match the test filepath from the last TEST-START line found in the new + # log content. These lines are in the form: + # ... INFO TEST-START | /filepath/we/wish/to/capture.html\n + testStartFilenames = re.findall(r"TEST-START \| ([^\s]*)", currentlog) + if testStartFilenames: + self.lastTestSeen = testStartFilenames[-1] if hasattr(self, 'logFinish') and self.logFinish in currentlog: return 0 else: