NEWS: fix minor typo
[buildbot.git] / contrib / run_maxq.py
blob3f70446d882e0cdefe9e1a290532155a1676c578
1 #!/usr/bin/env jython
3 import sys, glob
5 testdir = sys.argv[1]
7 orderfiles = glob.glob(testdir + '/*.tests')
9 # wee. just be glad I didn't make this one gigantic nested listcomp.
10 # anyway, this builds a once-nested list of files to test.
12 #open!
13 files = [open(fn) for fn in orderfiles]
15 #create prelim list of lists of files!
16 files = [f.readlines() for f in files]
18 #shwack newlines and filter out empties!
19 files = [filter(None, [fn.strip() for fn in fs]) for fs in files]
21 #prefix with testdir
22 files = [[testdir + '/' + fn.strip() for fn in fs] for fs in files]
24 print "Will run these tests:", files
26 i = 0
28 for testlist in files:
30 print "==========================="
31 print "running tests from testlist", orderfiles[i]
32 print "---------------------------"
33 i = i + 1
35 for test in testlist:
36 print "running test", test
38 try:
39 execfile(test, globals().copy())
41 except:
42 ei = sys.exc_info()
43 print "TEST FAILURE:", ei[1]
45 else:
46 print "SUCCESS"