Author: gnichols Date: 2010-06-11 00:57:46 +0000 (Fri, 11 Jun 2010) New Revision: 538
Modified: trunk/tests/reboot/reboot.py Log: 568526 - FEAT: add a reboot test
Modified: trunk/tests/reboot/reboot.py =================================================================== --- trunk/tests/reboot/reboot.py 2010-06-10 15:50:04 UTC (rev 537) +++ trunk/tests/reboot/reboot.py 2010-06-11 00:57:46 UTC (rev 538) @@ -146,8 +146,21 @@ print "Error: reboot took longer that %u minutes" % self.rebootTimeLimit return False log = self.v7Controller.getSystemLog("%s-%s" % (self.Name(), runTimeStamp.strip()), pid=False) - print "Reboot log:\n---------------------------------------------------------" - print log + rebootCount = 0 + for line in log.split('\n'): + if "kernel: Linux version" in line: + print line + rebootCount += 1 + if rebootCount is 0: + print "Error: could not detect reboot" + return False + if rebootCount > 1: + print "Error: system rebooted %u times" % rebootCount + return False + + print "reboot verified" + # print "Reboot log:\n---------------------------------------------------------" + # print log except Exception, e: print "Could not verify reboot" print e
v7-commits@lists.stg.fedorahosted.org