From 886d37866388a982a224cfb0d7f8594568fbc10c Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 20 Mar 2008 11:42:24 +0000 Subject: [PATCH] patch to force the kill_qemus step --- system/TestMain.py | 13 ++++++++++++- system/TestPlc.py | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/system/TestMain.py b/system/TestMain.py index 6209b29..40cef3c 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -25,7 +25,7 @@ class TestMain: 'standby_4', 'nodes_booted', 'standby_6','nodes_ssh', 'check_slices','check_initscripts', 'check_tcp', - 'kill_qemus', ] + 'force_kill_qemus', ] other_steps = [ 'stop_all_vservers','fresh_install', 'stop', 'clean_sites', 'clean_nodes', 'clean_slices', 'clean_keys', 'list_all_qemus', 'kill_qemus', 'stop_nodes' , @@ -176,6 +176,7 @@ steps refer to a method in TestPlc or to a step_* module # build a TestPlc object from the result for spec in all_plc_specs: spec['disabled'] = False + spec['forced']= True all_plcs = [ (x, TestPlc(x)) for x in all_plc_specs] # expose to the various objects for (spec,obj) in all_plcs: @@ -214,6 +215,16 @@ steps refer to a method in TestPlc or to a step_* module plcname=spec['name'] if spec['disabled']: utils.header("Plc %s is disabled - skipping step %s"%(plcname,stepname)) + if (stepname.find("force")==0 and spec['forced']) : + utils.header("Plc %s is disabled but running step %s anyway" + %(plcname,stepname)) + step_result = method(obj,self.options) + if step_result: + utils.header('********** SUCCESSFUL step %s on %s'%(stepname,plcname)) + else: + overall_result = False + spec['forced'] = False + utils.header('********** Step %s on %s FAILED - discarding that plc from further steps'%(stepname,plcname)) else: try: utils.header("Running step %s on plc %s"%(stepname,plcname)) diff --git a/system/TestPlc.py b/system/TestPlc.py index cb56023..801c771 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -160,7 +160,7 @@ class TestPlc: return True # kill only the right qemus - def kill_qemus(self,options): + def force_kill_qemus(self,options): for (box,nodes) in self.gather_hostBoxes().iteritems(): # push the script TestBox(box,options.buildname).copy("qemu_kill.sh") -- 2.45.2