Skip to content

Commit

Permalink
Bug 757838 - Make b2gautomation.py set lastTestSeen so crashes are ou…
Browse files Browse the repository at this point in the history
…tput with the test filename; r=jgriffin a=test-only
  • Loading branch information
Ed Morley committed Nov 3, 2012
1 parent eed4be1 commit 6389f73
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build/mobile/b2gautomation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(self, deviceManager, appName='', remoteLog=None,

# 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)
Expand Down Expand Up @@ -137,6 +138,12 @@ def waitForFinish(self, proc, utilityPath, timeout, maxTime, startTime,
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:
Expand Down

0 comments on commit 6389f73

Please sign in to comment.