harness: fix error inclusion in junit report generation
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Fri, 7 Oct 2016 15:38:00 +0000 (17:38 +0200)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Fri, 7 Oct 2016 15:38:00 +0000 (17:38 +0200)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

tools/harness/scalebench.py

index 92d5739..0166369 100755 (executable)
@@ -240,8 +240,8 @@ def write_testcase(build, machine, test, path, passed,
         if not passed:
             errors = harness.extract_errors(test, path)
             errorstr = 'Failed'
-            if errors is not None:
-                errorstr = ''.join([ unicode(l, errors='replace') for l in errors])
+            if errors is not None and len(errors) > 0:
+                errorstr += ': ' + ''.join([ unicode(l, errors='replace') for l in errors])
             ju_tc.add_failure_info(message=errorstr)
         return ju_tc
     else: