Skip to content

Commit

Permalink
[testudo] emphasise pass/fail
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information
hxw committed Nov 24, 2009
1 parent a3d74b7 commit 489633c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions testudo/src/ui2.py
Expand Up @@ -240,9 +240,10 @@ def runTest(self):
if line.startswith('S/N:'):
psn = line.split(' ')[-1]
if serialNumber == psn:
self.write('PASS: Programmed S/N matches\n')
self.write('PASS: Programmed S/N matches\n', 'pass-text')
raise StopTestException('Serial Number mismatch')
else:
self.write('FAIL: Programmed S/N(%s) != Serial Number(%s)\n' % (psn, serialNumber))
self.write('FAIL: Programmed S/N(%s) != Serial Number(%s)\n' % (psn, serialNumber), 'fail-text')

if '. Boot Test Program' == line[1:]:
s.write(line[0:1])
Expand Down Expand Up @@ -326,7 +327,10 @@ def runTest(self):
def write(self, message, style = None):
gtk.gdk.threads_enter()
if 'FAIL:' == message[0:5]:
style = 'fail-text'
self.testFailed = True
elif 'PASS:' == message[0:5]:
style = 'pass-text'
if style:
self.buffer.insert_with_tags(self.buffer.get_end_iter(), message,
self.buffer.get_tag_table().lookup(style))
Expand Down

0 comments on commit 489633c

Please sign in to comment.