X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestBox.py;h=63300edf84a336ecad9a2f63721c80495d041f6d;hb=d777a85ce4ac688edd7684bbd8b2689ba94f594e;hp=088922a28de667e6004ef1bd322f3b1a5ea321f2;hpb=a9667f299fa2d90fa59458d8b5368a10cf70f628;p=tests.git diff --git a/system/TestBox.py b/system/TestBox.py index 088922a..63300ed 100644 --- a/system/TestBox.py +++ b/system/TestBox.py @@ -14,10 +14,23 @@ class TestBox: return utils.system(command) else: if self.key: - to_run="ssh -i %s.rsa %s %s"%(self.key,self.hostname,command) + to_run="ssh -i %s.rsa %s %s"%(self.key,self.hostname, + utils.backslash_shell_specials(command)) else: - to_run="ssh %s %s"%(self.hostname,command) + to_run="ssh %s %s"%(self.hostname, + utils.backslash_shell_specials(command)) + return utils.system(to_run) + + def copy (self,local_file): + if self.hostname == "localhost": + return 0 + else: + if self.key: + to_run="scp -i %s.rsa %s %s:"%(self.key,local_file,self.hostname) + else: + to_run="scp %s %s:"%(local_file,self.hostname) return utils.system(to_run) def kill_all_qemus(self): self.run("killall qemu") +