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
8 suiteName = suite.children ('SUITE_NAME').next().gettext()
9 info ("%s [%s]" % ("*" * (57 - len (suiteName)), suiteName))
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'):
16 testName = result.children ('TEST_NAME').next().gettext()
17 if testName in testResults:
18 if result.name == 'CUNIT_RUN_TEST_FAILURE':
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()))
26 + test.append (xmlio.Element('traceback')[message])
27 + test.attr['status'] = 'failure'
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':
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()))
41 + test.append (xmlio.Element('traceback')[message])
42 test.attr['status'] = 'failure'
45 test.attr['status'] = 'success'
48 + testResults[testName] = test