Exemplo n.º 1
0
        testargs.append(arg)

    # All global variables should be set before any test classes are loaded.
    # That way, verbose printing can be done at the class definition level.
    wttest.WiredTigerTestCase.globalSetup(preserve, timestamp, gdbSub, verbose, dirarg, longtest)

    # Without any tests listed as arguments, do discovery
    if len(testargs) == 0:
        if scenario != "":
            sys.stderr.write("run.py: specifying a scenario requires a test name\n")
            usage()
            sys.exit(2)
        from discover import defaultTestLoader as loader

        suites = loader.discover(suitedir)
        suites = sorted(suites, key=lambda c: str(list(c)[0]))
        if configfile != None:
            suites = configApply(suites, configfile, configwrite)
        tests.addTests(restrictScenario(generate_scenarios(suites), ""))
    else:
        for arg in testargs:
            testsFromArg(tests, loader, arg, scenario)

    if debug:
        import pdb

        pdb.set_trace()

    result = wttest.runsuite(tests, parallel)
    sys.exit(0 if result.wasSuccessful() else 1)
Exemplo n.º 2
0
                configwrite = True
                continue
            print 'unknown arg: ' + arg
            usage()
            sys.exit(2)
        testargs.append(arg)

    # All global variables should be set before any test classes are loaded.
    # That way, verbose printing can be done at the class definition level.
    wttest.WiredTigerTestCase.globalSetup(preserve, timestamp, gdbSub, verbose,
                                          dirarg, longtest)

    # Without any tests listed as arguments, do discovery
    if len(testargs) == 0:
        from discover import defaultTestLoader as loader
        suites = loader.discover(suitedir)
        suites = sorted(suites, key=lambda c: str(list(c)[0]))
        if configfile != None:
            suites = configApply(suites, configfile, configwrite)
        tests.addTests(generate_scenarios(suites))
    else:
        for arg in testargs:
            testsFromArg(tests, loader, arg)

    if debug:
        import pdb
        pdb.set_trace()

    result = wttest.runsuite(tests, parallel)
    sys.exit(0 if result.wasSuccessful() else 1)
Exemplo n.º 3
0
                configfile = args.pop(0)
                configwrite = True
                continue
            print 'unknown arg: ' + arg
            usage()
            sys.exit(False)
        testargs.append(arg)

    # All global variables should be set before any test classes are loaded.
    # That way, verbose printing can be done at the class definition level.
    wttest.WiredTigerTestCase.globalSetup(preserve, timestamp, gdbSub, verbose)

    # Without any tests listed as arguments, do discovery
    if len(testargs) == 0:
        from discover import defaultTestLoader as loader
        suites = loader.discover(suitedir)
        suites = sorted(suites, key=lambda c: str(list(c)[0]))
        if configfile != None:
            suites = configApply(suites, configfile, configwrite)
        tests.addTests(generate_scenarios(suites))
    else:
        for arg in testargs:
            testsFromArg(tests, loader, arg)
        
    if debug:
        import pdb
        pdb.set_trace()

    result = wttest.runsuite(tests)
    sys.exit(not result.wasSuccessful())