reviewed list options parsing
[tests.git] / system / TestBox.py
index 978344c..9ad138f 100644 (file)
@@ -1,4 +1,6 @@
-# $Id$
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2010 INRIA 
+#
 # this models a box that hosts qemu nodes
 # could probably also be used for boxes that host plc instances
 import os.path
@@ -21,7 +23,9 @@ class TestBox:
         return self.test_ssh.is_local()
     
     def run_in_buildname (self,command,background=False):
-        utils.header("Running command %s on testbox %s"%(command,self.hostname()))
+        message="On %s: running %s"%(self.hostname(),command)
+        if background: message += " &"
+        utils.header(message)
         return self.test_ssh.run_in_buildname (command,background)
 
     # xxx could/should use rsync instead
@@ -34,8 +38,9 @@ class TestBox:
     def mkdir (self,dirname):
         return self.test_ssh.mkdir(dirname)
 
-    def kill_all_qemus(self):
-        self.run_in_buildname("template-qemu/qemu-kill-node")
+    # we need at least one nodename, as template-qemu is not synced on remote testboxes
+    def kill_all_qemus(self,nodedir):
+        self.run_in_buildname("%s/qemu-kill-node"%nodedir)
         return True
 
     def list_all_qemus(self):