Fix status where change object's comments field is None
[buildbot.git] / contrib / run_maxq.py
blob8a7fc6b5ab0547c4ea7f85f9881b73ea4780d559
1 #!/usr/bin/env jython
3 import sys
4 import glob
6 testdir = sys.argv[1]
8 orderfiles = glob.glob(testdir + '/*.tests')
10 # wee. just be glad I didn't make this one gigantic nested listcomp.
11 # anyway, this builds a once-nested list of files to test.
13 #open!
14 files = [open(fn) for fn in orderfiles]
16 #create prelim list of lists of files!
17 files = [f.readlines() for f in files]
19 #shwack newlines and filter out empties!
20 files = [filter(None, [fn.strip() for fn in fs]) for fs in files]
22 #prefix with testdir
23 files = [[testdir + '/' + fn.strip() for fn in fs] for fs in files]
25 print "Will run these tests:", files
27 i = 0
29 for testlist in files:
31 print "==========================="
32 print "running tests from testlist", orderfiles[i]
33 print "---------------------------"
34 i = i + 1
36 for test in testlist:
37 print "running test", test
39 try:
40 execfile(test, globals().copy())
42 except:
43 ei = sys.exc_info()
44 print "TEST FAILURE:", ei[1]
46 else:
47 print "SUCCESS"