From 4079bffdc14d32e416cb15bb87ca1fcbc5895504 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 21 Sep 2011 11:01:50 +0200 Subject: [PATCH] fix location of vplc timestamps --- system/Substrate.py | 2 +- system/TestPlc.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/Substrate.py b/system/Substrate.py index 4687973..bf8551c 100644 --- a/system/Substrate.py +++ b/system/Substrate.py @@ -450,7 +450,7 @@ class PlcBox (Box): # scan timestamps running_vsnames = [ i.vservername for i in self.plc_instances ] command= ['grep','.'] - command += ['/vservers/%s/timestamp'%vs for vs in running_vsnames] + command += ['/vservers/%s.timestamp'%vs for vs in running_vsnames] command += ['/dev/null'] ts_lines=self.backquote_ssh(command,trash_err=True).split('\n') for ts_line in ts_lines: diff --git a/system/TestPlc.py b/system/TestPlc.py index 394653c..247fb6f 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -443,11 +443,11 @@ class TestPlc: print '+\tqemu box %s'%node_spec['host_box'] print '+\thostname=%s'%node_spec['node_fields']['hostname'] - # write a timestamp in /vservers/<>/ + # write a timestamp in /vservers/<>.timestamp + # cannot be inside the vserver, that causes vserver .. build to cough def timestamp_vs (self): now=int(time.time()) - utils.system(self.test_ssh.actual_command("mkdir -p /vservers/%s"%self.vservername)) - return utils.system(self.test_ssh.actual_command("echo %d > /vservers/%s/timestamp"%(now,self.vservername)))==0 + return utils.system(self.test_ssh.actual_command("echo %d > /vservers/%s.timestamp"%(now,self.vservername)))==0 def local_pre (self): "run site-dependant pre-test script as defined in LocalTestResources" @@ -482,6 +482,7 @@ class TestPlc: def vs_delete(self): "vserver delete the test myplc" self.run_in_host("vserver --silent %s delete"%self.vservername) + self.run_in_host("rm -f /vservers/%s.timestamp"%self.vservername) return True ### install -- 2.43.0