From 8ce43f35012dbd30102699ee1f44dcbedbcabfb9 Mon Sep 17 00:00:00 2001
From: Andre Puschmann <andre@softwareradiosystems.com>
Date: Thu, 8 Nov 2018 11:58:22 +0100
Subject: [PATCH] log result when TC finishes with verdict inconc

when a TC finished with verdict inconc the JUnitLogger was not logging
the result and so the TC in the generated XML could have been interpreted
as passed

Signed-off-by: Andre Puschmann <andre@softwareradiosystems.com>
---
 loggerplugins/JUnitLogger2/JUnitLogger2.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/loggerplugins/JUnitLogger2/JUnitLogger2.cc b/loggerplugins/JUnitLogger2/JUnitLogger2.cc
index bc26c76d0..bb9f19e7b 100644
--- a/loggerplugins/JUnitLogger2/JUnitLogger2.cc
+++ b/loggerplugins/JUnitLogger2/JUnitLogger2.cc
@@ -236,6 +236,13 @@ void TestCase::writeTestCase(FILE* file_stream_) const{
       fprintf(file_stream_, "    <error type='DTE'>%s</error>\n", dte_reason.data());
       fprintf(file_stream_, "  </testcase>\n");
       break; }
+    case Inconc:  {
+      fprintf(file_stream_, "  <testcase classname='%s' name='%s' time='%f'>\n", module_name.data(), tc_name.data(), time);
+      fprintf(file_stream_, "    <failure type='inconclusive-verdict'>%s\n", reason.data());
+      fprintf(file_stream_, "%s\n", stack_trace.data());
+      fprintf(file_stream_, "    </failure>\n");
+      fprintf(file_stream_, "  </testcase>\n");
+      break; }
     default: 
       fprintf(file_stream_, "  <testcase classname='%s' name='%s' time='%f'/>\n", module_name.data(), tc_name.data(), time);
       break;
-- 
GitLab