author tbirdbld
Mon, 09 Jul 2018 15:48:15 -0400
changeset 1814 08a25116cd5a15f04f26ff1c54db2ebca6643e0a
parent 97 c2e02e5bbfdb1c7a463cb44d75b06d45070597d3
permissions -rwxr-xr-x
Added THUNDERBIRD_52_9_1_RELEASE THUNDERBIRD_52_9_1_BUILD3 tag(s) for changeset production-0.8. DONTBUILD CLOSED TREE a=release

#!/usr/bin/env jython

import sys
import glob

testdir = sys.argv[1]

orderfiles = glob.glob(testdir + '/*.tests')

# wee. just be glad I didn't make this one gigantic nested listcomp.
# anyway, this builds a once-nested list of files to test.

files = [open(fn) for fn in orderfiles]

#create prelim list of lists of files!
files = [f.readlines() for f in files]

#shwack newlines and filter out empties!
files = [filter(None, [fn.strip() for fn in fs]) for fs in files]

#prefix with testdir
files = [[testdir + '/' + fn.strip() for fn in fs] for fs in files]

print "Will run these tests:", files

i = 0

for testlist in files:

    print "==========================="
    print "running tests from testlist", orderfiles[i]
    print "---------------------------"
    i = i + 1

    for test in testlist:
        print "running test", test

            execfile(test, globals().copy())

            ei = sys.exc_info()
            print "TEST FAILURE:", ei[1]

            print "SUCCESS"