Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2018-07-18 17:19:40 +0000
committerJuergen Haug2018-07-18 17:19:40 +0000
commit33e12d15db7f984eae3350d992c797e85362c9ed (patch)
treeabbcf46bc4630f3c03b593a77e0d8807aaea9ff6 /runtime/org.eclipse.etrice.runtime.c/src
parentc33073c10865923d47f00981b04169929f32bcd9 (diff)
downloadorg.eclipse.etrice-33e12d15db7f984eae3350d992c797e85362c9ed.tar.gz
org.eclipse.etrice-33e12d15db7f984eae3350d992c797e85362c9ed.tar.xz
org.eclipse.etrice-33e12d15db7f984eae3350d992c797e85362c9ed.zip
[etUnit] fixed test case timing for java
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.c b/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.c
index bfc8dc2e2..36d3c219a 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.c
@@ -167,12 +167,7 @@ etInt16 etUnit_openTestCase(const char* testCaseName) {
}
void etUnit_closeTestCase(etInt16 id) {
- etTime time;
- OrderInfo* info;
- getTimeFromTarget(&time);
- etTimeHelpers_subtract(&time, &etUnit_lastTestCaseTime);
-
- info = getOrderInfo(id);
+ OrderInfo* info = getOrderInfo(id);
if(info != NULL){
if (info->currentIndex != info->size) {
etUnit_handleExpect(id, ET_FALSE, "EXPECT_ORDER was not completed", NULL, NULL, 0, 0);
@@ -180,6 +175,9 @@ void etUnit_closeTestCase(etInt16 id) {
}
if (etUnit_reportfile != NULL) {
+ etTime time;
+ getTimeFromTarget(&time);
+ etTimeHelpers_subtract(&time, &etUnit_lastTestCaseTime);
etLogger_fprintf(etUnit_reportfile, "tc end %d: %d\n", id, etTimeHelpers_convertToMSec(&time));
}
}

Back to the top