minor fixes
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sat, 23 Aug 2008 07:50:06 +0000 (07:50 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sat, 23 Aug 2008 07:50:06 +0000 (07:50 +0000)
system/TestSliver.py
system/TestSsh.py

index 7369a8d..f0238b3 100644 (file)
@@ -51,7 +51,7 @@ class TestSliver:
         return self.test_ssh.actual_command("sudo tar -C /var/log -cf - .")
     
     def check_sanity (self):
-        print 'WARNING: slice sanity check scripts NOT (yet?) run in sudo'
+        print 'NOTE: slice sanity check scripts NOT (yet?) run in sudo'
         extensions = [ 'py','pl','sh' ]
         path='tests/qaapi/qa/tests/slice/'
         scripts=utils.locate_sanity_scripts ('sliver '+self.name(), path,extensions)
@@ -64,8 +64,9 @@ class TestSliver:
     def check_sanity_script (self,local_script):
         ssh_handle=self.create_test_ssh()
         ssh_handle.copy_home(local_script)
-        if ssh_handle.run("./"+os.path.basename(local_script)) != 0:
-            print "WARNING: sanity check script %s FAILED"
+        scriptname=os.path.basename(local_script)
+        if ssh_handle.run("./"+scriptname) != 0:
+            print "WARNING: sanity check script %s FAILED"%scriptname
             # xxx - temporary : ignore result and always return true for now
             #return False
         return True
index 5b5ce94..fbaee1c 100644 (file)
@@ -153,7 +153,12 @@ class TestSsh:
             command += TestSsh.std_options
             if recursive: command += "-r "
             command += self.key_part()
-            command += "%s:%s/%s %s"%(self.hostname_part(),self.buildname,remote_file,local_file)
+            # absolute path - do not preprend buildname
+            if remote_file.find("/")==0:
+                remote_path=remote_file
+            else:
+                remote_path="%s/%s"%(self.buildname,remote_file)
+            command += "%s:%s %s"%(self.hostname_part(),remote_path,local_file)
         return utils.system(command)
 
     # this is only to avoid harmless message when host cannot be identified