From 1b53e7fba94188d65f5bbf6542a3f4298dad57ff Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 14 Feb 2008 17:11:56 +0000 Subject: [PATCH] expose buildname in options to avoid filename conflicts on host boxes --- system/TestMain.py | 7 +++++-- system/TestNode.py | 9 +-------- system/qemu_kill.sh | 1 + 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/system/TestMain.py b/system/TestMain.py index 1458b89..8599695 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -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") diff --git a/system/TestNode.py b/system/TestNode.py index 617d715..f4a55dc 100644 --- a/system/TestNode.py +++ b/system/TestNode.py @@ -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 diff --git a/system/qemu_kill.sh b/system/qemu_kill.sh index d2c1fc1..f108228 100755 --- a/system/qemu_kill.sh +++ b/system/qemu_kill.sh @@ -1,4 +1,5 @@ #!/bin/sh +# $Id$ COMMAND=$(basename $0) hostname=$1; shift -- 2.43.0