4 """Simple script that scans all of the test suite results text fed in
5 through stdin and summarises the total number of failures, test
6 points, and test cases."""
9 lines = sys.stdin.readlines()
11 # Init the running totals
17 # '--- Summary: f/t/c ...', where f = # failures, t = # test points,
19 if (re.search(r'^--- Summary:', line)):
20 (summary, data, rest) = re.split(r':', line)
21 (nfailures, ntests, ncases) = re.split(r'/', data)
22 failures = failures + string.atof(nfailures)
23 tests = tests + string.atof(ntests)
24 cases = cases + string.atof(ncases)
26 print "%.0f failures, %.0f tests, %.0f test cases" % (failures, tests, cases)