X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Ftestbeds%2Fplanetlab%2Fintegration.py;h=0edcb1e383b90e7d9969f872e7e9fbfd750b518f;hb=552a2b6824a9e07fa6a5189bc7404fed12378d55;hp=05c4bd386752be38dd59d870993990d39feadbea;hpb=3febf4984ace49f2552ff4b167126fc80d9c46b5;p=nepi.git diff --git a/test/testbeds/planetlab/integration.py b/test/testbeds/planetlab/integration.py index 05c4bd38..0edcb1e3 100755 --- a/test/testbeds/planetlab/integration.py +++ b/test/testbeds/planetlab/integration.py @@ -18,12 +18,20 @@ class PlanetLabIntegrationTestCase(unittest.TestCase): self.root_dir = tempfile.mkdtemp() def tearDown(self): - shutil.rmtree(self.root_dir) + try: + shutil.rmtree(self.root_dir) + except: + # retry + time.sleep(0.1) + shutil.rmtree(self.root_dir) def make_experiment_desc(self): testbed_id = "planetlab" testbed_version = "01" slicename = "inria_nepi12" + pl_ssh_key = os.environ.get( + "PL_SSH_KEY", + "%s/.ssh/id_rsa_planetlab" % (os.environ['HOME'],) ) pl_user, pl_pwd = test_util.pl_auth() exp_desc = ExperimentDescription() @@ -31,7 +39,7 @@ class PlanetLabIntegrationTestCase(unittest.TestCase): pl_desc = exp_desc.add_testbed_description(pl_provider) pl_desc.set_attribute_value("homeDirectory", self.root_dir) pl_desc.set_attribute_value("slice", slicename) - pl_desc.set_attribute_value("sliceSSHKey", "/user/%s/home/.ssh/id_rsa_planetlab" % (getpass.getuser(),)) + pl_desc.set_attribute_value("sliceSSHKey", pl_ssh_key) pl_desc.set_attribute_value("authUser", pl_user) pl_desc.set_attribute_value("authPass", pl_pwd)