aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2018-06-08 12:00:50 -0400
committerHenrik Rentz-Reichert2018-06-08 12:43:32 -0400
commitb2e558a382dc661f16439bfe2ee8e311bc2ccefd (patch)
treec5e456955b40b2c7beec2556e272c113300924cb
parentf6fd7aa313377083b3f2acb49b422e05a7b02552 (diff)
downloadorg.eclipse.etrice-b2e558a382dc661f16439bfe2ee8e311bc2ccefd.tar.gz
org.eclipse.etrice-b2e558a382dc661f16439bfe2ee8e311bc2ccefd.tar.xz
org.eclipse.etrice-b2e558a382dc661f16439bfe2ee8e311bc2ccefd.zip
Bug 535727 - etunit conversion should convert elapsed time from ms to s
Times are converted appropriately. Change-Id: Ib16a0883a0b6243a7fca6a03215895a5d3fb2f8d
-rw-r--r--plugins/org.eclipse.etrice.etunit.converter/model/readme.md7
-rw-r--r--plugins/org.eclipse.etrice.etunit.converter/src/org/eclipse/etrice/etunit/converter/EtUnitReportConverter.java3
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.etrice.etunit.converter/model/readme.md b/plugins/org.eclipse.etrice.etunit.converter/model/readme.md
new file mode 100644
index 000000000..f7e6a7f18
--- /dev/null
+++ b/plugins/org.eclipse.etrice.etunit.converter/model/readme.md
@@ -0,0 +1,7 @@
+# XML Schema for XUnit
+
+There seems to be a "more official" XML schema:
+[stackoverflow on Spec. for JUnit XML output](https://stackoverflow.com/questions/442556/spec-for-junit-xml-output)
+mentions
+[a github project for the JUnit schema used by Apache Ant](https://github.com/windyroad/JUnit-Schema).
+The [schema file](https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd) has Apache License Version 2.0. \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.etunit.converter/src/org/eclipse/etrice/etunit/converter/EtUnitReportConverter.java b/plugins/org.eclipse.etrice.etunit.converter/src/org/eclipse/etrice/etunit/converter/EtUnitReportConverter.java
index d61327eed..34d2cb765 100644
--- a/plugins/org.eclipse.etrice.etunit.converter/src/org/eclipse/etrice/etunit/converter/EtUnitReportConverter.java
+++ b/plugins/org.eclipse.etrice.etunit.converter/src/org/eclipse/etrice/etunit/converter/EtUnitReportConverter.java
@@ -450,7 +450,8 @@ public class EtUnitReportConverter {
input.close();
return null;
}
- tc.setTime(BigDecimal.valueOf(time));
+ // time was measured in ms. Convert to s
+ tc.setTime(BigDecimal.valueOf(time/1000.0));
}
line = bufRead.readLine();
++count;