From: Thierry Parmentelat Date: Mon, 27 Jan 2014 08:45:14 +0000 (+0100) Subject: manage -t now shows a status line with = B or W (for warning) X-Git-Tag: tests-5.3-2~29 X-Git-Url: http://git.onelab.eu/?p=tests.git;a=commitdiff_plain;h=3d1f6209d1edf3fef30c3f28d930592d26e1966b manage -t now shows a status line with = B or W (for warning) --- diff --git a/system/Substrate.py b/system/Substrate.py index 0978842..0bd7d3e 100644 --- a/system/Substrate.py +++ b/system/Substrate.py @@ -869,10 +869,20 @@ class TestInstance: def set_broken (self, plcindex, step): self.broken_steps.append ( (plcindex, step,) ) + def second_letter (self): + if not self.broken_steps: return '=' + else: + really_broken = [ step for (i,step) in self.broken_steps if '_ignore' not in step ] + # W is for warning like what's in the build mail + if len(really_broken)==0: return 'W' + else: return 'B' + def line (self): - double='==' - if self.pids: double='*'+double[1] - if self.broken_steps: double=double[0]+'B' + # make up a 2-letter sign + # first letter : '=', unless build is running : '*' + double = '*' if self.pids else '=' + # second letter : '=' if fine, 'W' for warnings (only ignored steps) 'B' for broken + double += self.second_letter() msg = " %s %s =="%(double,self.buildname) if not self.pids: pass elif len(self.pids)==1: msg += " (pid=%s)"%self.pids[0]