Exemplo n.º 1
0
def testAll(track, gsroot, now, options):
    suite = gstestutils.GSTestSuite()

    print options.myself, gsconf.comparefiledir
    print options.myself, "test parameter set: " + gsparamsets.testparamsets_name

    if not os.path.exists(gsroot):
        print options.myself, "FATAL: gsroot directory does not exist", gsroot
        sys.exit(1)

    gsexecutable = gsroot + "bin/gs"
    if not os.path.exists(gsexecutable):
        print options.myself, "FATAL: gsexecutable does not exist", gsexecutable
        sys.exit(1)

    revision = get_revision_of_HEAD(dir=gsroot)
    print options.myself, "from tree:", gsroot, "revision is:", revision

    # Add tests based on running Ghostscript.
    gscheck_all.addTests(suite,
                         gsroot=gsroot,
                         track=track,
                         now=now,
                         options=options)

    # Add tests not based on actually running Ghostscript.
    check_all.addTests(suite, gsroot=gsroot)

    # run all the tests
    runner = gstestutils.GSTestRunner(verbosity=2)

    cwd = os.getcwd()

    start_time = time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime())
    print options.myself, start_time, "executing in", gsroot
    os.chdir(gsroot)

    result = runner.run(suite)

    end_time = time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime())
    print options.myself, end_time, "complete", cwd
    os.chdir(cwd)
def testAll(track,gsroot,now,options):
    suite = gstestutils.GSTestSuite()

    print options.myself,gsconf.comparefiledir
    print options.myself,"test parameter set: "+gsparamsets.testparamsets_name

    if not os.path.exists(gsroot):
        print options.myself,"FATAL: gsroot directory does not exist",gsroot        
        sys.exit(1)

    gsexecutable=gsroot+"bin/gs"
    if not os.path.exists(gsexecutable):
        print options.myself,"FATAL: gsexecutable does not exist",gsexecutable        
        sys.exit(1)

    revision=get_revision_of_HEAD(dir=gsroot)
    print options.myself,"from tree:",gsroot,"revision is:",revision
    
    # Add tests based on running Ghostscript.
    gscheck_all.addTests(suite, gsroot=gsroot, track=track, now=now, options=options)

    # Add tests not based on actually running Ghostscript.
    check_all.addTests(suite, gsroot=gsroot)

    # run all the tests
    runner = gstestutils.GSTestRunner(verbosity=2)

    cwd=os.getcwd()

    start_time=time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime())
    print options.myself,start_time,"executing in",gsroot
    os.chdir(gsroot)

    result = runner.run(suite)

    end_time=time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime())
    print options.myself,end_time,"complete",cwd
    os.chdir(cwd)