continue

        if incorrect:
            incorrect = [
                'These %d files have C++ style comments:' % (len(incorrect), )
            ] + incorrect

        self.failIfMessages(incorrect)


## Main stuff

checkDirs = [(
    'src',
    ['c', 'h'],
    # list of exempt files
    [
        'dwdll.h', 'dwimg.h', 'dwinst.h', 'dwsetup.h', 'dwtext.h',
        'dwuninst.h', 'gdevhpij.c', 'dmmain.c', 'gdevmac.c', 'gdevmacxf.c',
        'gdevwdib.c', 'gp_mac.c', 'gp_macio.c', 'macsysstat.h'
    ])]


def addTests(suite, gsroot, **args):
    for dir, extns, skip in checkDirs:
        suite.addTest(GSCheckForComments(gsroot, dir, extns, skip))


if __name__ == "__main__":
    gsRunTestsMain(addTests)
Exemple #2
0
        self.failIfMessages(messages)

################ Main program

gsSourceSets = [
    ('doc', ['*'], ['Changes.htm', 'gsdoc.el', 'FTL.txt']),
    ('lib', ['eps', 'ps'], []),
    ('man', ['*'], []),
    ('src', ['c', 'cpp', 'h', 'mak'], []),
    ('toolbin', ['*'], ['pre.chk'])
    ]
gsDoubleInclusionOK = [
    'src/gconf.h',
    'src/gxdtfill.h',
    'src/gxfillsl.h',
    'src/gxfilltr.h',
    'src/gxfillts.h',
    'src/gxsamplp.h',
    'src/gdevpdfb.h'
    ]

# Add the tests defined in this file to a suite.

def addTests(suite, gsroot, **args):
    for dir, extns, skip in gsSourceSets:
        suite.addTest(GSCheckForIdLines(gsroot, dir, extns, skip))
    suite.addTest(GSCheckDoubleInclusion(gsroot, gsDoubleInclusionOK))

if __name__ == "__main__":
    gsRunTestsMain(addTests)
					    device=device,dpi=dpi,band=band, 
                                            log_stdout=log_stdout,
                                            log_stderr=log_stderr,
                                            track_daily=track,now=now)
                  )

def addTests(suite,gsroot,now,options=None, **args):
    if options:
        pass # future implementation possible
    
    if args.has_key('track'):
        track = args['track']
    else:
        track = 0
    
    # get a list of test files
    comparefiles = os.listdir(gsconf.comparefiledir)
    comparefiles.sort()

#    for testfile in comparefiles:
#        print myself,testfile

    for testfile in comparefiles:
        if gsutil.check_extension(testfile):
	    for params in gsparamsets.pdftestparamsets:
	        add_compare_test(suite,
                                 gsroot,testfile,params.device,params.resolution,params.banding,track)

if __name__ == "__main__":
    gstestutils.gsRunTestsMain(addTests)