updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / bitten-svn / bitten-cunit-traceback.patch
blob698911649085f4b3629c6c80b9664a1229f4ad7b
1 Add error messages inline.
3 diff -r 3aa368e1a120 bitten/build/ctools.py
4 --- a/bitten/build/ctools.py Mon Jan 18 14:40:12 2038 +0009
5 +++ b/bitten/build/ctools.py Fri Nov 06 14:04:38 2009 +0100
6 @@ -245,7 +245,7 @@
7 continue
8 suiteName = suite.children ('SUITE_NAME').next().gettext()
9 info ("%s [%s]" % ("*" * (57 - len (suiteName)), suiteName))
10 - testResults = set()
11 + testResults = {}
12 for record in suite.children ('CUNIT_RUN_TEST_RECORD'):
13 for result in record.children():
14 if result.name not in ('CUNIT_RUN_TEST_SUCCESS', 'CUNIT_RUN_TEST_FAILURE'):
15 @@ -253,27 +253,33 @@
16 testName = result.children ('TEST_NAME').next().gettext()
17 if testName in testResults:
18 if result.name == 'CUNIT_RUN_TEST_FAILURE':
19 - error ("%s(%d): %s"
20 + test = testResults[testName]
21 + message = ("%s(%d): %s"
22 % (result.children ('FILE_NAME').next().gettext(),
23 int (result.children ('LINE_NUMBER').next().gettext()),
24 result.children ('CONDITION').next().gettext()))
25 + error (message)
26 + test.append (xmlio.Element('traceback')[message])
27 + test.attr['status'] = 'failure'
28 continue
29 - testResults.add (testName)
30 info ("Running %s..." % testName);
31 test = xmlio.Element('test')
32 test.attr['fixture'] = suiteName
33 test.attr['name'] = testName
34 if result.name == 'CUNIT_RUN_TEST_FAILURE':
35 - error ("%s(%d): %s"
36 + message = ("%s(%d): %s"
37 % (result.children ('FILE_NAME').next().gettext(),
38 int (result.children ('LINE_NUMBER').next().gettext()),
39 result.children ('CONDITION').next().gettext()))
40 + error (message)
41 + test.append (xmlio.Element('traceback')[message])
42 test.attr['status'] = 'failure'
43 failed += 1
44 else:
45 test.attr['status'] = 'success'
47 results.append(test)
48 + testResults[testName] = test
49 total += 1
51 if failed: