def run(self): bisect = GitBisect(self.config.src_dir) # TODO: save revision in .md5 files and get the good # revision from refs when not provided by command line try: bisect.start(self.config.bad, self.config.good) except: print("Couldn't start git bisect") return finished = False while not finished: test_runner = TestRun(os.path.dirname(self._test), self._refsdir, self._outdir) try: self._builder.build() except: print( "Impossible to find regression, build is broken in revision: %s" % (self.__get_current_revision())) break test_runner.run_test(os.path.basename(self._test)) if test_runner._n_passed == 0: finished = bisect.bad() else: finished = bisect.good() bisect.reset()
def run(self, options): config = Config() config.keep_results = options['keep_results'] config.create_diffs = options['create_diffs'] t = Timer() doc = options['tests'] if os.path.isdir(doc): docs_dir = doc else: docs_dir = os.path.dirname(doc) tests = TestRun(docs_dir, options['refs_dir'], options['out_dir']) if doc == docs_dir: tests.run_tests() else: tests.run_test(os.path.basename(doc)) tests.summary() print("Tests run in %s" % (t.elapsed_str()))
def run(self): bisect = GitBisect(self.config.src_dir) # TODO: save revision in .md5 files and get the good # revision from refs when not provided by command line try: bisect.start(self.config.bad, self.config.good) except: print("Couldn't start git bisect") return finished = False while not finished: test_runner = TestRun(os.path.dirname(self._test), self._refsdir, self._outdir) try: self._builder.build() except: print("Impossible to find regression, build is broken in revision: %s" % (self.__get_current_revision())) break test_runner.run_test(os.path.basename(self._test)) if test_runner._n_passed == 0: finished = bisect.bad() else: finished = bisect.good() bisect.reset()