0001
0002
0003 class TdcPlugin:
0004 def __init__(self):
0005 super().__init__()
0006 print(' -- {}.__init__'.format(self.sub_class))
0007
0008 def pre_suite(self, testcount, testidlist):
0009 '''run commands before test_runner goes into a test loop'''
0010 self.testcount = testcount
0011 self.testidlist = testidlist
0012 if self.args.verbose > 1:
0013 print(' -- {}.pre_suite'.format(self.sub_class))
0014
0015 def post_suite(self, index):
0016 '''run commands after test_runner completes the test loop
0017 index is the last ordinal number of test that was attempted'''
0018 if self.args.verbose > 1:
0019 print(' -- {}.post_suite'.format(self.sub_class))
0020
0021 def pre_case(self, caseinfo, test_skip):
0022 '''run commands before test_runner does one test'''
0023 if self.args.verbose > 1:
0024 print(' -- {}.pre_case'.format(self.sub_class))
0025 self.args.caseinfo = caseinfo
0026 self.args.test_skip = test_skip
0027
0028 def post_case(self):
0029 '''run commands after test_runner does one test'''
0030 if self.args.verbose > 1:
0031 print(' -- {}.post_case'.format(self.sub_class))
0032
0033 def pre_execute(self):
0034 '''run command before test-runner does the execute step'''
0035 if self.args.verbose > 1:
0036 print(' -- {}.pre_execute'.format(self.sub_class))
0037
0038 def post_execute(self):
0039 '''run command after test-runner does the execute step'''
0040 if self.args.verbose > 1:
0041 print(' -- {}.post_execute'.format(self.sub_class))
0042
0043 def adjust_command(self, stage, command):
0044 '''adjust the command'''
0045 if self.args.verbose > 1:
0046 print(' -- {}.adjust_command {}'.format(self.sub_class, stage))
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 return command
0064
0065 def add_args(self, parser):
0066 '''Get the plugin args from the command line'''
0067 self.argparser = parser
0068 return self.argparser
0069
0070 def check_args(self, args, remaining):
0071 '''Check that the args are set correctly'''
0072 self.args = args
0073 if self.args.verbose > 1:
0074 print(' -- {}.check_args'.format(self.sub_class))