Exemplo n.º 1
0
    def run(self, options):
        config = Config()
        config.keep_results = options['keep_results']
        config.create_diffs = options['create_diffs']
        config.update_refs = options['update_refs']

        t = Timer()
        docs = options['tests']
        docs_dir = options['docs_dir']

        if len(docs) == 1:
            if os.path.isdir(docs[0]):
                if docs_dir is None:
                    docs_dir = docs[0]
                if docs_dir == docs[0]:
                    docs = []
            else:
                if docs_dir is None:
                    docs_dir = os.path.dirname(docs[0])
        else:
            if docs_dir is None:
                docs_dir = os.path.commonprefix(docs).rpartition(os.path.sep)[0]

        tests = TestRun(docs_dir, options['refs_dir'], options['out_dir'])
        status = tests.run_tests(docs)
        tests.summary()
        get_printer().printout_ln("Tests run in %s" % (t.elapsed_str()))

        return status
Exemplo n.º 2
0
    def run(self, options):
        config = Config()
        config.src_dir = options["src_dir"]
        config.builder = options["builder"]
        config.prefix = options["prefix"]
        config.good = options["good"]
        config.bad = options["bad"]

        doc = options["test"]
        if not os.path.isfile(doc):
            get_printer().printerr("Invalid test %s: not a regulat file" % (doc))
            return

        t = Timer()
        bisect = Bisect(options["test"], options["refs_dir"], options["out_dir"])
        bisect.run()
        get_printer().printout_ln("Tests run in %s" % (t.elapsed_str()))
Exemplo n.º 3
0
    def run(self, options):
        config = Config()
        config.src_dir = options['src_dir']
        config.builder = options['builder']
        config.prefix = options['prefix']
        config.good = options['good']
        config.bad = options['bad']

        doc = options['test']
        if not os.path.isfile(doc):
            print("Invalid test %s: not a regulat file" % (doc))
            return

        t = Timer()
        bisect = Bisect(options['test'], options['refs_dir'], options['out_dir'])
        bisect.run()
        print("Tests run in %s" % (t.elapsed_str()))
Exemplo n.º 4
0
    def run(self, options):
        config = Config()
        config.force = options['force']
        config.checksums_only = options['checksums_only']

        t = Timer()
        doc = options['tests']
        if os.path.isdir(doc):
            docs_dir = doc
        else:
            docs_dir = os.path.dirname(doc)

        refs = TestReferences(docs_dir, options['refs_dir'])
        if doc == docs_dir:
            refs.create_refs()
        else:
            refs.create_refs_for_file(os.path.basename(doc))
        get_printer().printout_ln("Refs created in %s" % (t.elapsed_str()))
Exemplo n.º 5
0
    def run(self, options):
        config = Config()
        config.src_dir = options['src_dir']
        config.builder = options['builder']
        config.prefix = options['prefix']
        config.good = options['good']
        config.bad = options['bad']

        doc = options['test']
        if not os.path.isfile(doc):
            print("Invalid test %s: not a regulat file" % (doc))
            return

        t = Timer()
        bisect = Bisect(options['test'], options['refs_dir'],
                        options['out_dir'])
        bisect.run()
        print("Tests run in %s" % (t.elapsed_str()))
Exemplo n.º 6
0
    def run(self, options):
        config = Config()
        config.force = options['force']
        config.checksums_only = options['checksums_only']

        t = Timer()
        doc = options['tests']
        if os.path.isdir(doc):
            docs_dir = doc
        else:
            docs_dir = os.path.dirname(doc)

        refs = TestReferences(docs_dir, options['refs_dir'])
        if doc == docs_dir:
            refs.create_refs()
        else:
            refs.create_refs_for_file(os.path.basename(doc))
        print("Refs created in %s" % (t.elapsed_str()))
Exemplo n.º 7
0
    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()))
Exemplo n.º 8
0
    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()))