[zorg] r174136 - LitTestCommand: Fix typo that prevented proper command status on failing tests.
Daniel Dunbar
daniel at zuster.org
Thu Jan 31 17:39:45 PST 2013
Author: ddunbar
Date: Thu Jan 31 19:39:45 2013
New Revision: 174136
URL: http://llvm.org/viewvc/llvm-project?rev=174136&view=rev
Log:
LitTestCommand: Fix typo that prevented proper command status on failing tests.
Modified:
zorg/trunk/zorg/buildbot/commands/LitTestCommand.py
Modified: zorg/trunk/zorg/buildbot/commands/LitTestCommand.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/commands/LitTestCommand.py?rev=174136&r1=174135&r2=174136&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/commands/LitTestCommand.py (original)
+++ zorg/trunk/zorg/buildbot/commands/LitTestCommand.py Thu Jan 31 19:39:45 2013
@@ -36,7 +36,6 @@ class LitLogObserver(LogLineObserver):
if m.group(1)==self.inFailure[0]:
self.inFailure[1].append(line)
self.inFailureContext = True
- self.failed = True
return
else:
msg = 'm[0]: %r\ninFailure[0]: %r' % (m.group(0), self.inFailure[0])
@@ -51,7 +50,7 @@ class LitLogObserver(LogLineObserver):
self.inFailure = None
if code in self.failingCodes:
self.inFailure = (name, [line])
- self.Failed = True
+ self.failed = True
if not code in self.resultCounts:
self.resultCounts[code] = 0
self.resultCounts[code] += 1
@@ -138,5 +137,11 @@ class TestCommand(unittest.TestCase):
cmd = self.parse_log("")
self.assertEqual(cmd.evaluateCommand(RemoteCommandProxy(1)), FAILURE)
+ # If there were failing tests, the status should be an error (even if the
+ # test command didn't report as such).
+ for failing_code in ('FAIL', 'XPASS', 'KPASS', 'UNRESOLVED'):
+ cmd = self.parse_log("""%s: test-one (1 of 1)""" % (failing_code,))
+ self.assertEqual(cmd.evaluateCommand(RemoteCommandProxy(0)), FAILURE)
+
if __name__ == '__main__':
unittest.main()
More information about the llvm-commits
mailing list