return self.test_ssh.actual_command("sudo tar -C /var/log -cf - .")
def check_sanity (self):
- print 'WARNING: slice sanity check scripts NOT (yet?) run in sudo'
+ print 'NOTE: slice sanity 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)
def check_sanity_script (self,local_script):
ssh_handle=self.create_test_ssh()
ssh_handle.copy_home(local_script)
- if ssh_handle.run("./"+os.path.basename(local_script)) != 0:
- print "WARNING: sanity check script %s FAILED"
+ scriptname=os.path.basename(local_script)
+ if ssh_handle.run("./"+scriptname) != 0:
+ print "WARNING: sanity check script %s FAILED"%scriptname
# xxx - temporary : ignore result and always return true for now
#return False
return True
command += TestSsh.std_options
if recursive: command += "-r "
command += self.key_part()
- command += "%s:%s/%s %s"%(self.hostname_part(),self.buildname,remote_file,local_file)
+ # absolute path - do not preprend buildname
+ if remote_file.find("/")==0:
+ remote_path=remote_file
+ else:
+ remote_path="%s/%s"%(self.buildname,remote_file)
+ command += "%s:%s %s"%(self.hostname_part(),remote_path,local_file)
return utils.system(command)
# this is only to avoid harmless message when host cannot be identified