Author: gnichols Date: 2010-06-18 00:29:51 +0000 (Fri, 18 Jun 2010) New Revision: 562
Modified: trunk/tests/fencing/fencing.py Log: 568518 - FEAT: add a BMC fencing testing
Modified: trunk/tests/fencing/fencing.py =================================================================== --- trunk/tests/fencing/fencing.py 2010-06-18 00:05:27 UTC (rev 561) +++ trunk/tests/fencing/fencing.py 2010-06-18 00:29:51 UTC (rev 562) @@ -81,7 +81,6 @@ print "Waiting for shutdown..." sys.stdout.flush() time.sleep(waitTime) - self.getResults()
def getResults(self): request = self.url @@ -94,8 +93,12 @@ opener = urllib2.build_opener() response = opener.open(request).readlines() print "result: " + result = False for line in response: - sys.stdout.write(line) + sys.stdout.write(line) + if "<summary>%s</summary>" % Constants.PASS in line: + result = True + return result
def run(self): PASSED = 0 @@ -122,13 +125,19 @@ print "Server side test for %s\n" % self.Name() outFile.write("Server side test for %s\n" % self.Name())
- if True: + try: agentIP = args["agentIP"] ping = Command("ping -c 1 " + agentIP) ping.run() for line in ping.output: print line outFile.write(line + "\n") + except Exception, e: + print "Error: " + print e + outFile.write("Error: %s" % e) + return False + return True
if __name__ == "__main__": test = FencingTest()
v7-commits@lists.stg.fedorahosted.org