Lines Matching defs:options

187     def kill_cmd(self, proc, options, kmemleak, keyboard_interrupt=False):
217 self.run(options, dryrun=False, kmemleak=kmemleak)
263 def run(self, options, dryrun=None, kmemleak=None):
270 dryrun = options.dryrun
275 kmemleak = options.kmemleak
290 if options.kmsg is True and exists("/dev/kmsg"):
302 if options.kmsg is True and exists("/dev/ttyu0"):
321 int(self.timeout), self.kill_cmd, [proc, options, kmemleak]
327 out, err = self.collect_output(proc, options.debug)
337 self.kill_cmd(proc, options, kmemleak, True)
358 def log(self, options, suppress_console=False):
385 if not options.quiet:
387 elif options.quiet and self.result.result != 'PASS':
477 def run(self, options, dryrun=None, kmemleak=None):
499 pretest.run(options, kmemleak=False)
501 pretest.log(options)
504 test.run(options, kmemleak=kmemleak)
506 failsafe.run(options, kmemleak=False)
507 failsafe.log(options, suppress_console=True)
511 test.log(options)
514 posttest.run(options, kmemleak=False)
515 posttest.log(options)
598 def run(self, options, dryrun=None, kmemleak=None):
605 if options.tags and not set(self.tags).intersection(set(options.tags)):
617 pretest.run(options, dryrun=dryrun, kmemleak=False)
619 pretest.log(options)
630 test.run(options, dryrun=dryrun, kmemleak=kmemleak)
632 failsafe.run(options, dryrun=dryrun, kmemleak=False)
633 failsafe.log(options, suppress_console=True)
637 test.log(options)
640 posttest.run(options, dryrun=dryrun, kmemleak=False)
641 posttest.log(options)
647 def __init__(self, options):
652 self.outputdir = os.path.join(options.outputdir, self.timestamp)
653 self.setup_logging(options)
679 def addtest(self, pathname, options):
687 setattr(test, prop, getattr(options, prop))
692 def addtestgroup(self, dirname, filenames, options):
701 setattr(testgroup, prop, getattr(options, prop))
731 def read(self, options):
741 parsed = config.read(options.runfiles)
742 failed = options.runfiles - set(parsed)
752 testdir = options.testdir
755 if 'tests' in config.options(section):
802 def write(self, options):
812 defaults = dict([(prop, getattr(options, prop)) for prop, _ in
832 with open(options.template, 'w') as f:
835 fail('Could not open \'%s\' for writing.' % options.template)
869 def setup_logging(self, options):
875 if options.dryrun is True:
879 if not options.template:
889 def run(self, options):
907 if options.kmemleak:
912 while iteration < options.iterations:
914 self.tests[test].run(options)
916 self.testgroups[testgroup].run(options)
1008 def find_tests(testrun, options):
1015 for p in sorted(options.pathnames):
1018 if options.do_groups:
1019 testrun.addtestgroup(dirname, filenames, options)
1022 testrun.addtest(os.path.join(dirname, f), options)
1024 testrun.addtest(p, options)
1027 def filter_tests(testrun, options):
1029 fh = open(options.logfile, "r")
1144 (options, pathnames) = parser.parse_args()
1146 if options.runfiles and len(pathnames):
1149 options.pathnames = [os.path.abspath(path) for path in pathnames]
1151 return options
1155 options = parse_args()
1157 testrun = TestRun(options)
1159 if options.runfiles:
1160 testrun.read(options)
1162 find_tests(testrun, options)
1164 if options.logfile:
1165 filter_tests(testrun, options)
1167 if options.template:
1168 testrun.write(options)
1172 testrun.run(options)