- cleandir_command="ssh root@%s rm -rf %s"%(host_box, dest_dir)
- createdir_command = "ssh root@%s mkdir -p %s"%(host_box, dest_dir)
- utils.system(cleandir_command)
- utils.system(createdir_command)
- scp_command = "scp -r %s/qemu-%s/* root@%s:/root/%s"%(path,hostname,host_box,dest_dir)
- utils.system(scp_command)
+ if ( not self.is_local(host_box)):
+ cleandir_command="ssh root@%s rm -rf %s"%(host_box, dest_dir)
+ createdir_command = "ssh root@%s mkdir -p %s"%(host_box, dest_dir)
+ createlog_command = "ssh root@%s touch %s/%s.log "%(host_box, dest_dir,hostname)
+ self.test_plc.run_in_host(cleandir_command)
+ self.test_plc.run_in_host(createdir_command)
+ self.test_plc.run_in_host(createlog_command)
+ scp_command = "scp -r %s/qemu-%s/* root@%s:/root/%s"%(path,hostname,host_box,dest_dir)
+ self.test_plc.run_in_host(scp_command)