From 3ddfdefd278472fe3d807a36449c27a0da9bc6fa Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 24 Jan 2014 18:32:35 +0100 Subject: [PATCH] implement retcod as adverized --- system/TestMain.py | 4 ++-- system/TestPlc.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/system/TestMain.py b/system/TestMain.py index bca8a3c..f3d38fc 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -525,8 +525,8 @@ steps refer to a method in TestPlc or to a step_* module try: success=self.run() if success == 'SUCCESS': return 0 - elif success == 'IGNORED': return 2 - else: return 1 + elif success == 'IGNORED': return 1 + else: return 2 except SystemExit: print 'Caught SystemExit' return 3 diff --git a/system/TestPlc.py b/system/TestPlc.py index c9b621b..7c629f0 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -71,7 +71,7 @@ def ignore_result (method): ref_name=method.__name__.replace('_ignore','').replace('force_','') ref_method=TestPlc.__dict__[ref_name] result=ref_method(self) - print "Actual - but ignored - result for %(ref_name)s is %(result)s"%locals() + print "Actual (but ignored) result for %(ref_name)s is %(result)s"%locals() return Ignored (result) wrappee.__doc__="ignored version of " + method.__name__.replace('_ignore','').replace('ignore_','') return wrappee @@ -170,7 +170,7 @@ class TestPlc: 'plc_db_dump' , 'plc_db_restore', SEP, 'check_netflow','check_drl', SEP, 'debug_nodemanager', SEP, - 'standby_1_through_20',SEP, + 'standby_1_through_20','yes','no',SEP, ] @staticmethod @@ -1776,3 +1776,7 @@ class TestPlc: def standby_19(): pass @standby_generic def standby_20(): pass + + # convenience for debugging the test logic + def yes (self): return True + def no (self): return False -- 2.43.0