Commit eb3570f0 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

fix screen logging to actually report a failure


git-svn-id: file:///svn/toku/tokudb@42118 c7de825b-a66e-492c-adef-691d508d4ae1
parent b6bbdbdc
...@@ -190,13 +190,9 @@ class TestRunnerBase(object): ...@@ -190,13 +190,9 @@ class TestRunnerBase(object):
else: else:
return time.ctime(timeval) return time.ctime(timeval)
def infostr(self, passed): def infostr(self, result):
if passed: return ('[PASS=%d FAIL=%d] %s %s tsize=%d csize=%d ptquery=%d update=%d' %
result = 'PASSED' (self.scheduler.passed, self.scheduler.failed, result,
else:
result = 'FAILED'
return ('[PASS=%d FAIL=%d] PASSED %s tsize=%d csize=%d ptquery=%d update=%d' %
(self.scheduler.passed, self.scheduler.failed,
self.execf, self.tsize, self.csize, self.ptquery, self.update)) self.execf, self.tsize, self.csize, self.ptquery, self.update))
def logstr(self, result): def logstr(self, result):
...@@ -206,12 +202,12 @@ class TestRunnerBase(object): ...@@ -206,12 +202,12 @@ class TestRunnerBase(object):
def print_success(self): def print_success(self):
self.scheduler.passed += 1 self.scheduler.passed += 1
self.logger.info(self.logstr('PASSED')) self.logger.info(self.logstr('PASSED'))
info(self.infostr(True)) info(self.infostr('PASSED'))
def print_failure(self): def print_failure(self):
self.scheduler.failed += 1 self.scheduler.failed += 1
self.logger.warning(self.logstr('FAILED')) self.logger.warning(self.logstr('FAILED'))
warning(self.infostr(False)) warning(self.infostr('FAILED'))
def waitfor(self, proc): def waitfor(self, proc):
while proc.poll() is None: while proc.poll() is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment