# so that the tests do not have to worry about extracting the build (svn, git, or whatever)
def create_vs (self):
"vserver creation (no install done)"
+ # push the local build/ dir to the testplc box
if self.is_local():
# a full path for the local calls
build_dir=os.path.dirname(sys.argv[0])
else:
# use a standard name - will be relative to remote buildname
build_dir="build"
- # push the local build/ dir to the testplc box
- self.test_ssh.mkdir(build_dir)
+ # remove for safety; do *not* mkdir first, otherwise we end up with build/build/
+ self.test_ssh.rmdir(build_dir)
self.test_ssh.copy(build_dir,recursive=True)
# the repo url is taken from arch-rpms-url
# with the last step (i386) removed
import os.path
import utils
+import shutil
class TestSsh:
dirname=self.buildname
return self.run("mkdir -p %s"%dirname)
+ def rmdir (self,dirname=None):
+ if self.is_local():
+ if dirname:
+ return shutil.rmtree(dirname)
+ return 0
+ if dirname:
+ dirname="%s/%s"%(self.buildname,dirname)
+ else:
+ dirname=self.buildname
+ return self.run("rm -rf %s"%dirname)
+
def create_buildname_once (self):
if self.is_local():
return