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
script_name=os.path.basename(local_script)
- utils.header ("NODE %s : running sanity check script %s"%(self.name(),script_name))
+ utils.header ("NODE %s : running hooks check script %s"%(self.name(),script_name))
ssh_handle=self.create_test_ssh()
ssh_handle.copy_home(local_script)
if ssh_handle.run("./"+script_name) != 0:
- utils.header ("WARNING: node sanity check script %s FAILED"%script_name)
+ utils.header ("WARNING: node hooks check script %s FAILED"%script_name)
print 'temporary : ignoring result and always return true for now'
#return False
return True
else:
- utils.header ("SUCCESS: node sanity check script %s OK"%script_name)
+ utils.header ("SUCCESS: node hooks check script %s OK"%script_name)
return True
# better use of time: do this now that the nodes are taking off
'plcsh_stress_test', SEP,
'nodes_ssh_debug', 'nodes_ssh_boot', 'check_slice', 'check_initscripts', SEP,
- 'check_tcp', 'check_sanity', SEP,
+ 'check_tcp', 'check_hooks', SEP,
'force_gather_logs', 'force_local_post',
]
other_steps = [
"all nodes: push local node-dep directory on the qemu box"
pass
- ### check sanity : invoke scripts from qaapi/qa/tests/{node,slice}
- def check_sanity_node (self):
- return self.locate_first_node().check_sanity()
- def check_sanity_sliver (self) :
- return self.locate_first_sliver().check_sanity()
+ ### check hooks : invoke scripts from hooks/{node,slice}
+ def check_hooks_node (self):
+ return self.locate_first_node().check_hooks()
+ def check_hooks_sliver (self) :
+ return self.locate_first_sliver().check_hooks()
- def check_sanity (self):
- "runs unit tests in the node and slice contexts - see tests/qaapi/qa/tests/{node,slice}"
- return self.check_sanity_node() and self.check_sanity_sliver()
+ def check_hooks (self):
+ "runs unit tests in the node and slice contexts - see hooks/{node,slice}"
+ return self.check_hooks_node() and self.check_hooks_sliver()
### initscripts
def do_check_initscripts(self):
return True
###
- def trplc_record (self):
+ def trplc_record (self,plc):
tracker = TrackerPlc(plc.options,instances=self.max_plcs())
tracker.record(self.test_ssh.hostname,self.vservername)
tracker.store()
return True
- def trplc_free (self):
+ def trplc_free (self,plc):
tracker = TrackerPlc(plc.options,instances=self.max_plcs())
tracker.free()
tracker.store()
dir_to_tar="/vservers/%s/var/log"%self.test_slice.name()
return test_ssh.actual_command("tar -C %s -cf - ."%dir_to_tar)
- def check_sanity (self):
- print 'NOTE: slice sanity check scripts NOT (yet?) run in sudo'
+ def check_hooks (self):
+ print 'NOTE: slice hooks check scripts NOT (yet?) run in sudo'
extensions = [ 'py','pl','sh' ]
- path='tests/qaapi/qa/tests/slice/'
- scripts=utils.locate_sanity_scripts ('sliver '+self.name(), path,extensions)
+ path='hooks/slice/'
+ scripts=utils.locate_hooks_scripts ('sliver '+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):
script_name=os.path.basename(local_script)
- utils.header ("SLIVER %s : running sanity check script %s"%(self.name(),script_name))
+ utils.header ("SLIVER %s : running hooks check script %s"%(self.name(),script_name))
ssh_handle=self.create_test_ssh()
ssh_handle.copy_home(local_script)
if ssh_handle.run("./"+script_name) != 0:
- utils.header ("WARNING: sanity check script %s FAILED"%script_name)
+ utils.header ("WARNING: hooks check script %s FAILED"%script_name)
print 'temporary : ignoring result and always return true for now'
#return False
return True
else:
- utils.header ("SUCCESS: sliver sanity check script %s OK"%script_name)
+ utils.header ("SUCCESS: sliver hooks check script %s OK"%script_name)
return True
pattern=pattern.replace("?",".")
return re.compile(pattern).match(string)
-def locate_sanity_scripts (message,path,extensions):
+def locate_hooks_scripts (message,path,extensions):
print message,'searching',path,'for extensions',extensions
scripts=[]
for ext in extensions: