Classes | Functions | Variables
runtests Namespace Reference

Classes

class  Tester
 
class  TestManager
 

Functions

def main ()
 

Variables

 config_reg = re.compile('.*\/\/\s*(?P<name>\S+):\s*(?P<value>.*)$')
 

Function Documentation

def runtests.main ( void  )

Definition at line 167 of file runtests.py.

167 def main():
168  # argument handling
169  parser = argparse.ArgumentParser(description='run doxygen tests')
170  parser.add_argument('--updateref',help='update the reference data for a test',action="store_true")
171  parser.add_argument('--doxygen',nargs='?',default='doxygen',help='path/name of the doxygen executable')
172  parser.add_argument('--xmllint',nargs='?',default='xmllint',help='path/name of the xmllint executable')
173  parser.add_argument('--id',nargs='+',dest='ids',action='append',type=int,help='id of the test to perform')
174  parser.add_argument('--all',help='perform all tests',action="store_true")
175  parser.add_argument('--inputdir',nargs='?',default='.',help='input directory containing the tests')
176  parser.add_argument('--outputdir',nargs='?',default='.',help='output directory to write the doxygen output to')
177  args = parser.parse_args()
178 
179  # sanity check
180  if (not args.updateref is None) and (args.ids is None) and (args.all is None):
181  parser.error('--updateref requires either --id or --all')
182 
183  starting_directory = os.getcwd()
184  os.chdir(args.inputdir)
185  # find the tests to run
186  if args.ids: # test ids are given by user
187  tests = []
188  for id in list(itertools.chain.from_iterable(args.ids)):
189  tests.append(glob.glob('%s_*'%id))
190  tests.append(glob.glob('0%s_*'%id))
191  tests.append(glob.glob('00%s_*'%id))
192  tests = list(itertools.chain.from_iterable(tests))
193  else: # find all tests
194  tests = glob.glob('[0-9][0-9][0-9]_*')
195  os.chdir(starting_directory)
196 
197  # create test manager to run the tests
198  testManager = TestManager(args,tests)
199  sys.exit(testManager.perform_tests())
200 
def main()
Definition: runtests.py:167

Variable Documentation

runtests.config_reg = re.compile('.*\/\/\s*(?P<name>\S+):\s*(?P<value>.*)$')

Definition at line 6 of file runtests.py.