python - Pysys - How to run only the validate portion of a test -


i looking @ way add new "mode" in pysys baserunner.

in particular add validate mode, re-run validation portion. useful when writing testcase , trying tune validation condition fit current output without having re-reun complete testcase.

what best way without having change original class?

this requires support framework unfortunately. issue baserunner class automatically purge output directory, , there no hook framework allow avoid this. can instance move output subdirectory manually want re-run validation on 'repeat' (same directory level), , use;

from pysys.constants import * pysys.basetest import basetest  class pysystest(basetest):     def execute(self):         if self.mode=='repeat': pass      def validate(self):         if self.mode=='repeat':             self.output=os.path.join(self.descriptor.output, 'repeat') 

where have ommitted implementations of execute , validate. need add mode descriptor test

  <classification>     <groups>       <group></group>     </groups>     <modes>       <mode>repeat</mode>     </modes>   </classification> 

and run using "pysys.py run -mrepeat". debugging if execute takes long time, not want want out-of-the-box i.e. top level option runner perform validation on run test. i'll add feature request this.


Comments