#Prepare the log file before killing the nodes
test_box = self.test_box()
# kill the right processes
- utils.header("Stopping qemu for host %s on box %s"%(self.name(),self.test_box().hostname()))
+ utils.header("Stopping qemu for node %s on box %s"%(self.name(),self.test_box().hostname()))
command="%s/qemu-kill-node %s"%(self.nodedir(),self.name())
self.test_box().run_in_buildname(command)
return True
key = "keys/%(vservername)s.rsa"%locals()
return TestSsh(self.name(), buildname=self.buildname(), key=key)
- def check_sanity (self):
+ def check_hooks (self):
extensions = [ 'py','pl','sh' ]
- path='tests/qaapi/qa/tests/node/'
- scripts=utils.locate_sanity_scripts ('node '+self.name(), path,extensions)
+ path='hooks/node'
+ scripts=utils.locate_hooks_scripts ('node '+self.name(), path,extensions)
overall = True
for script in scripts:
- if not self.check_sanity_script (script):
+ if not self.check_hooks_script (script):
overall = False
return overall
- def check_sanity_script (self,local_script):
+ def check_hooks_script (self,local_script):
# push the script on the node's root context
- ssh_handle=self.create_test_ssh()
- ssh_handle.copy_home(local_script)
script_name=os.path.basename(local_script)
- if ssh_handle.run("./"+script_name) != 0:
- print "WARNING: sanity check script %s FAILED"%script_name
- # xxx - temporary : always return true for now
+ utils.header ("NODE hook %s (%s)"%(script_name,self.name()))
+ test_ssh=self.create_test_ssh()
+ test_ssh.copy_home(local_script)
+ if test_ssh.run("./"+script_name) != 0:
+ utils.header ("WARNING: node hooks check script %s FAILED (ignored)"%script_name)
#return False
- return True
+ return True
+ else:
+ utils.header ("SUCCESS: node hook %s OK"%script_name)
+ return True