+
+ # scan timestamps on all tests
+ # this is likely to not invoke ssh so we need to be a bit smarter to get * expanded
+ # xxx would make sense above too
+ command=['bash','-c',"grep . /root/*/timestamp /dev/null"]
+ #ts_lines=self.backquote_ssh(command,trash_err=True).split('\n')
+ ts_lines=self.backquote_ssh(command).split('\n')
+ for ts_line in ts_lines:
+ if not ts_line.strip(): continue
+ # expect /root/<buildname>/timestamp:<timestamp>
+ try:
+ (ts_file,timestamp)=ts_line.split(':')
+ ts_file=os.path.dirname(ts_file)
+ buildname=os.path.basename(ts_file)
+ timestamp=int(timestamp)
+ t=self.add_timestamp(buildname,timestamp)
+ except: print 'WARNING, could not parse ts line',ts_line
+
+ command=['bash','-c',"grep KO /root/*/logs/trace* /dev/null" ]
+ trace_lines=self.backquote_ssh (command).split('\n')
+ for line in trace_lines:
+ if not line.strip(): continue
+ m=TestBox.matcher_grep.match(line)
+ if m:
+ buildname=m.group('buildname')
+ plcindex=m.group('plcindex')
+ step=m.group('step')
+ self.add_broken(buildname,plcindex, step)
+ else: header("command %r returned line that failed to match\n%s"%(command,line))
+