[pypy-svn] r59238 - pypy/build/bot2/pypybuildbot
pedronis at codespeak.net
pedronis at codespeak.net
Sun Oct 19 17:23:02 CEST 2008
Author: pedronis
Date: Sun Oct 19 17:23:02 2008
New Revision: 59238
Modified:
pypy/build/bot2/pypybuildbot/builds.py
pypy/build/bot2/pypybuildbot/summary.py
Log:
try to dinstinguish aborted test runs
Modified: pypy/build/bot2/pypybuildbot/builds.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/builds.py (original)
+++ pypy/build/bot2/pypybuildbot/builds.py Sun Oct 19 17:23:02 2008
@@ -3,6 +3,15 @@
from buildbot.status.builder import SUCCESS
+class ShellCmd(shell.ShellCommand):
+ # our own version that can distinguish abort cases (rc == -1)
+
+ def getText(self, cmd, results):
+ if cmd.rc == -1:
+ return self.describe(True) + ['aborted']
+ return shell.ShellCommand.getText(self, cmd, results)
+
+
class FirstTime(shell.SetProperty):
def __init__(self, **kwds):
@@ -17,22 +26,22 @@
command = "if not exist pypy echo yes"
-class CondShellCommand(shell.ShellCommand):
+class CondShellCommand(ShellCmd):
def __init__(self, **kwds):
- shell.ShellCommand.__init__(self, **kwds)
+ ShellCmd.__init__(self, **kwds)
self.cond = kwds.get('cond', lambda props: True)
def start(self):
props = self.build.getProperties()
yes = self.cond(props)
if yes:
- shell.ShellCommand.start(self)
+ ShellCmd.start(self)
else:
self.setStatus(None, SUCCESS)
self.finished(SUCCESS)
-class Translate(shell.ShellCommand):
+class Translate(ShellCmd):
name = "translate"
description = ["translating"]
descriptionDone = ["translation"]
@@ -47,7 +56,7 @@
kw['translationArgs'] = translationArgs
kw['targetArgs'] = targetArgs
kw['timeout'] = 3600
- shell.ShellCommand.__init__(self, workdir, *a, **kw)
+ ShellCmd.__init__(self, workdir, *a, **kw)
self.command = (self.command + translationArgs +
[self.translationTarget] + targetArgs)
@@ -83,7 +92,7 @@
setup_steps(platform, self)
- self.addStep(shell.ShellCommand(
+ self.addStep(ShellCmd(
description="pytest",
command=["python", "testrunner/runner.py",
"--logfile=testrun.log",
@@ -104,7 +113,7 @@
self.addStep(Translate(["-O2"], []))
- self.addStep(shell.ShellCommand(
+ self.addStep(ShellCmd(
description="lib-python test",
command=["python", "pypy/test_all.py",
"--pypy=pypy/translator/goal/pypy-c",
Modified: pypy/build/bot2/pypybuildbot/summary.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/summary.py (original)
+++ pypy/build/bot2/pypybuildbot/summary.py Sun Oct 19 17:23:02 2008
@@ -97,11 +97,14 @@
pytest_log = None
stdio_log = None
failure = None
+ aborted = False
for step in build.getSteps():
logs = dict((log.getName(), log) for log in step.getLogs())
if 'pytestLog' in logs:
- pytest_log = logs['pytestLog']
stdio_log = logs['stdio']
+ if 'aborted' in step.getText():
+ aborted = True
+ pytest_log = logs['pytestLog']
break
elif (stdio_log is None and
step.getResults()[0] in (FAILURE, EXCEPTION)):
@@ -120,6 +123,8 @@
name = failure or '<run>'
outcome_set.populate_one(name, '!', "no log from the test run")
else:
+ if aborted:
+ outcome_set.populate_one('<run> aborted', '!', "")
outcome_set.populate(pytest_log)
return outcome_set
More information about the Pypy-commit
mailing list