Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2013-05-15 09:44:13 +0000
committerHenrik Rentz-Reichert2013-05-15 09:44:13 +0000
commitcd0c1fde24a4b228ead28c20244b94a997c1d937 (patch)
treeeb575048b74c31857ec101729bebf253987a959a /tests
parent977d0e692401ce05bad43a7acd1b06a5ace9f289 (diff)
downloadorg.eclipse.etrice-cd0c1fde24a4b228ead28c20244b94a997c1d937.tar.gz
org.eclipse.etrice-cd0c1fde24a4b228ead28c20244b94a997c1d937.tar.xz
org.eclipse.etrice-cd0c1fde24a4b228ead28c20244b94a997c1d937.zip
[runtime.c, runtime.c.tests] debug output and minor changes
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c10
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/tmp/testlog/TestEtUnitSpecial.etu4
3 files changed, 9 insertions, 7 deletions
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c
index 851f7b108..d4b9a3c01 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c
@@ -42,7 +42,7 @@ etBool DummyMessageDispatcher(const etMessage* msg){
default:
break;
}
- return FALSE;
+ return TRUE;
}
void TestEtMessageService_init(etInt16 id){
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c
index f1ea5bc2a..87ad15aaf 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c
@@ -28,10 +28,12 @@ etSema GlobalSema;
etInt32 counter;
void TestEtTimer_TimerCallback1(void* data){
+ printf("TestEtTimer_TimerCallback1\n"); fflush(stdout); // TODO: remove debug output
etSema_wakeup(&GlobalSema);
}
void TestEtTimer_TimerCallback2(void* data){
+ printf("TestEtTimer_TimerCallback2\n"); fflush(stdout); // TODO: remove debug output
counter++;
}
@@ -52,16 +54,16 @@ static void TestEtTimer_lifecycle (etInt16 id) {
NULL);
getTimeFromTarget(&startTime);
- printf("TestEtTimer_lifecycle: start timer\n"); fflush(stdout); // remove debug output
+ printf("TestEtTimer_lifecycle: start timer\n"); fflush(stdout); // TODO: remove debug output
etTimer_start(&timer1);
- printf("TestEtTimer_lifecycle: wait for timer\n"); fflush(stdout); // remove debug output
+ printf("TestEtTimer_lifecycle: wait for timer\n"); fflush(stdout); // TODO: remove debug output
etSema_waitForWakeup(&GlobalSema); /* wait until callback function releases timer the first time (fires immediately) */
- printf("TestEtTimer_lifecycle: wait again\n"); fflush(stdout); // remove debug output
+ printf("TestEtTimer_lifecycle: wait again\n"); fflush(stdout); // TODO: remove debug output
etSema_waitForWakeup(&GlobalSema); /* wait until callback function releases timer the second time (fires after first interval)*/
etTimer_stop(&timer1);
getTimeFromTarget(&endTime);
- printf("TestEtTimer_lifecycle: timer stopped\n"); fflush(stdout); // remove debug output
+ printf("TestEtTimer_lifecycle: timer stopped\n"); fflush(stdout); // TODO: remove debug output
etInt32 elapsed = etTimeHelpers_convertToMSec(&endTime) - etTimeHelpers_convertToMSec(&startTime);
EXPECT_TRUE(id, "elapsed time wrong", (elapsed > 1400) && (elapsed < 1600));
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/tmp/testlog/TestEtUnitSpecial.etu b/tests/org.eclipse.etrice.runtime.c.tests/tmp/testlog/TestEtUnitSpecial.etu
index a3c2ec10f..5435d343a 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/tmp/testlog/TestEtUnitSpecial.etu
+++ b/tests/org.eclipse.etrice.runtime.c.tests/tmp/testlog/TestEtUnitSpecial.etu
@@ -1,4 +1,4 @@
etUnit report
ts start: etUnit
-tc start 17: openAll and closeAll
-tc end 17: 0
+tc start 16: openAll and closeAll
+tc end 16: 0

Back to the top