expose buildname in options to avoid filename conflicts on host boxes
Thierry Parmentelat [Thu, 14 Feb 2008 17:11:56 +0000 (17:11 +0000)]
system/TestMain.py
system/TestNode.py
system/qemu_kill.sh

index 1458b89..8599695 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # $Id$
 
-import os, sys
+import sys, os, os.path
 from optparse import OptionParser
 import traceback
 
@@ -24,7 +24,8 @@ class TestMain:
                      'kill_all_qemus', 'start_nodes', 
                      'standby_4', 'nodes_booted',
                      'standby_6','nodes_ssh', 'check_slices',
-                     'check_tcp' ]
+                     'check_tcp',
+                     'kill_qemus', ]
     other_steps = [ 'fresh_install', 'stop', 
                     'clean_sites', 'clean_nodes', 'clean_slices', 'clean_keys',
                     'list_all_qemus', 'kill_qemus', 'stop_nodes' ,  
@@ -152,6 +153,8 @@ steps refer to a method in TestPlc or to a step_* module
 
         # store self.path in options.path for the various callbacks
         self.options.path = self.path
+        # this is useful when propagating on host boxes, to avoid conflicts
+        self.options.buildname = os.path.basename (os.path.abspath (self.path))
 
         if self.options.verbose:
             self.show_env(self.options,"Verbose")
index 617d715..f4a55dc 100644 (file)
@@ -151,15 +151,8 @@ class TestNode:
         else:
             utils.header("TestNode.start_node : ignoring model %s"%model)
 
-    def get_host_in_hostbox(self,hostbox,test_site):
-        hosts=[]
-        for node_spec in test_site.site_spec['nodes']:
-            if (node_spec['host_box'] == hostbox):
-                hosts.append((node_spec['node_fields']['hostname'],node_spec['node_fields']['model']))
-        return hosts
-        
     def start_qemu (self, options):
-        utils.header("Starting Qemu nodes")
+        utils.header("Starting Qemu node")
         host_box=self.host_box()
         hostname=self.node_spec['node_fields']['hostname']
         path=options.path
index d2c1fc1..f108228 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# $Id$
 COMMAND=$(basename $0)
 
 hostname=$1; shift