From: Thierry Parmentelat Date: Tue, 8 Apr 2008 12:32:21 +0000 (+0000) Subject: oops, this needs to move as well X-Git-Tag: tests-4.2-4~76 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=397b2de1eb2eb7c5745618acf786c2b5f51c254c;p=tests.git oops, this needs to move as well --- diff --git a/system/TestMain.py b/system/TestMain.py index 76c9509..ba3d712 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -10,8 +10,6 @@ from TestPlc import TestPlc from TestSite import TestSite from TestNode import TestNode -SEP='' - class TestMain: subversion_id = "$Id$" @@ -36,13 +34,9 @@ class TestMain: except: setattr(parser.values,option.dest,value.split()) - @staticmethod - def printable_steps (list): - return " ".join(list).replace(" "+SEP+" ","\n") - def run (self): - steps_message=20*'x'+" Defaut steps are\n"+TestMain.printable_steps(TestPlc.default_steps) - steps_message += "\n"+20*'x'+" Other useful steps are\n"+TestMain.printable_steps(TestPlc.other_steps) + steps_message=20*'x'+" Defaut steps are\n"+TestPlc.printable_steps(TestPlc.default_steps) + steps_message += "\n"+20*'x'+" Other useful steps are\n"+TestPlc.printable_steps(TestPlc.other_steps) usage = """usage: %%prog [options] steps myplc-url defaults to the last value used, as stored in arg-myplc-url, no default diff --git a/system/TestPlc.py b/system/TestPlc.py index 531670d..6e69d81 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -58,6 +58,8 @@ def slice_mapper_options (method): return overall return actual +SEP='' + class TestPlc: default_steps = ['uninstall','install','install_rpm', @@ -76,6 +78,11 @@ class TestPlc: 'db_dump' , 'db_restore', 'standby_1 through 20' ] + + @staticmethod + def printable_steps (list): + return " ".join(list).replace(" "+SEP+" ","\n") + def __init__ (self,plc_spec,options): self.plc_spec=plc_spec self.options=options