X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestBox.py;h=978344c3f504aab45829bc0f85c25ae92e985ada;hb=560938db174121e93854fd39b66d29be86769864;hp=35de00c2df51ce29765773d5446c3c219207d880;hpb=7de5c03439f167ee95fcf3c735e8cc0c6dff60a7;p=tests.git diff --git a/system/TestBox.py b/system/TestBox.py index 35de00c..978344c 100644 --- a/system/TestBox.py +++ b/system/TestBox.py @@ -5,6 +5,7 @@ import os.path import utils from TestSsh import TestSsh +# xxx this should probably inherit TestSsh class TestBox: def __init__(self,hostname,buildname,key=None): @@ -19,32 +20,25 @@ class TestBox: def is_local(self): return self.test_ssh.is_local() - def tar_logs(self): - if os.path.isdir("nodeslogs"): - tar_command="tar cvf nodeslogs.tar nodeslogs/" - self.run_in_buildname (tar_command) - return True - return False - - def run_in_buildname (self,command): + def run_in_buildname (self,command,background=False): utils.header("Running command %s on testbox %s"%(command,self.hostname())) - return self.test_ssh.run_in_buildname (command) + return self.test_ssh.run_in_buildname (command,background) - # should use rsync instead + # xxx could/should use rsync instead def copy (self,local_file,recursive=False): return self.test_ssh.copy (local_file,recursive) def clean_dir (self,dirname): return self.test_ssh.clean_dir(dirname) - def mkdir (self,direname): - return self.test_ssh.mkdir(direname) + def mkdir (self,dirname): + return self.test_ssh.mkdir(dirname) def kill_all_qemus(self): - self.run_in_buildname("template-qemu/kill-qemu-node") + self.run_in_buildname("template-qemu/qemu-kill-node") return True def list_all_qemus(self): - self.run_in_buildname("template-qemu/kill-qemu-node -l") + self.run_in_buildname("template-qemu/qemu-kill-node -l") return True