From: Thierry Parmentelat Date: Wed, 24 Apr 2013 14:46:47 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.onelab.eu/git/tests X-Git-Tag: tests-5.2-3~1 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=737175852208c30ed521ed04b0eb6315408d9e4c;hp=5da61dd790ffdd3d66dc43e902a32630a4df2dde;p=tests.git Merge branch 'master' of ssh://git.onelab.eu/git/tests --- diff --git a/system/TestMain.py b/system/TestMain.py index ae4a861..a325223 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -171,7 +171,9 @@ steps refer to a method in TestPlc or to a step_* module help="Specify the set of hostnames for the boxes that host the nodes") parser.add_option("-N","--nodes",action="append", dest="ips_vnode", default=[], help="Specify the set of hostname/IP's to use for vnodes") - parser.add_option ('-X', "--lxc",action='store_true',dest='plcs_use_lxc', + parser.add_option ('-X', "--lxc",action='store_true',dest='plcs_use_lxc',default=True, + help='use lxc-enabled plc boxes instead of vs-enabled ones') + parser.add_option ('-S', "--vs",action='store_false',dest='plcs_use_lxc', help='use lxc-enabled plc boxes instead of vs-enabled ones') parser.add_option("-s","--size",action="store",type="int",dest="size",default=1, help="sets test size in # of plcs - default is 1") diff --git a/system/TestNode.py b/system/TestNode.py index 9447fd6..c9d31f8 100644 --- a/system/TestNode.py +++ b/system/TestNode.py @@ -201,6 +201,12 @@ class TestNode: file.close() return True + def qemu_clean (self): + utils.header("Cleaning up qemu for host %s on box %s"%(self.name(),self.test_box().hostname())) + dry_run=self.dry_run() + self.test_box().rmdir(self.nodedir(), dry_run=dry_run) + return True + def qemu_export (self): "all nodes: push local node-dep directory on the qemu box" # if relevant, push the qemu area onto the host box @@ -208,7 +214,6 @@ class TestNode: return True dry_run=self.dry_run() utils.header ("Cleaning any former sequel of %s on %s"%(self.name(),self.host_box())) - self.test_box().rmdir(self.nodedir(), dry_run=dry_run) utils.header ("Transferring configuration files for node %s onto %s"%(self.name(),self.host_box())) return self.test_box().copy(self.nodedir(),recursive=True,dry_run=dry_run)==0 @@ -244,12 +249,6 @@ class TestNode: self.test_box().run_in_buildname(command, dry_run=self.dry_run()) return True - def clean_qemu (self): - utils.header("Cleaning up qemu for host %s on box %s"%(self.name(),self.test_box().hostname())) - command="rm -rf %s"%(self.nodedir()) - self.test_box().run_in_buildname(command, dry_run=self.dry_run()) - return True - def kill_qemu (self): #Prepare the log file before killing the nodes test_box = self.test_box() diff --git a/system/TestPlc.py b/system/TestPlc.py index c1486e2..cda7874 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -92,7 +92,7 @@ class TestPlc: # keep this our of the way for now # 'check_vsys_defaults', SEP, 'nodestate_reinstall', 'qemu_local_init','bootcd', 'qemu_local_config', SEP, - 'qemu_export', 'qemu_kill_mine', 'qemu_start', 'timestamp_qemu', SEP, + 'qemu_kill_mine','qemu_clean_mine', 'qemu_export', 'qemu_start', 'timestamp_qemu', SEP, 'sfa_install_all', 'sfa_configure', 'cross_sfa_configure', 'sfa_start', 'sfa_import', SEPSFA, 'sfi_configure@1', 'sfa_add_site@1','sfa_add_pi@1', SEPSFA, 'sfa_add_user@1', 'sfa_update_user@1', 'sfa_add_slice@1', 'sfa_renew_slice@1', SEPSFA, @@ -115,7 +115,7 @@ class TestPlc: 'delete_leases', 'list_leases', SEP, 'populate', SEP, 'nodestate_show','nodestate_safeboot','nodestate_boot', SEP, - 'qemu_list_all', 'qemu_list_mine', 'qemu_kill_all', 'qemu_clean_mine', SEP, + 'qemu_list_all', 'qemu_list_mine', 'qemu_kill_all', SEP, 'sfa_install_core', 'sfa_install_sfatables', 'sfa_install_plc', 'sfa_install_client', SEPSFA, 'sfa_plcclean', 'sfa_dbclean', 'sfa_stop','sfa_uninstall', 'sfi_clean', SEPSFA, 'plc_db_dump' , 'plc_db_restore', SEP, @@ -387,7 +387,7 @@ class TestPlc: for (box,nodes) in self.get_BoxNodes().iteritems(): # the fine-grain version for node in nodes: - node.clean_qemu() + node.qemu_clean() return True # kill only the right qemus