aboutsummaryrefslogtreecommitdiffstats
path: root/test/test.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-06-26 13:36:25 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-06-26 13:36:25 +0000
commit8292744ffd977bbe16d4fe4273a4acdc196e463d (patch)
treedd8ae1b571b4b23a16048104150807a6aee4d9f7 /test/test.c
parent300ecfe103d1d305e78a15196d2fa1aecfddc729 (diff)
downloadChibiOS-8292744ffd977bbe16d4fe4273a4acdc196e463d.tar.gz
ChibiOS-8292744ffd977bbe16d4fe4273a4acdc196e463d.tar.bz2
ChibiOS-8292744ffd977bbe16d4fe4273a4acdc196e463d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@324 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/test.c')
-rw-r--r--test/test.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/test/test.c b/test/test.c
index d6f9f0717..f9a185d03 100644
--- a/test/test.c
+++ b/test/test.c
@@ -24,6 +24,7 @@
#include "testsem.h"
#include "testmtx.h"
#include "testmsg.h"
+#include "testbmk.h"
/*
* Array of all the test cases.
@@ -37,6 +38,11 @@ static const struct testcase *tests[] = {
&testmtx2,
&testmtx3,
&testmsg1,
+ &testbmk1,
+ &testbmk2,
+ &testbmk3,
+ &testbmk4,
+ &testbmk5,
NULL
};
@@ -159,6 +165,26 @@ void test_cpu_pulse(systime_t ms) {
}
}
+systime_t test_wait_tick(void) {
+
+ systime_t time = chSysGetTime() + 1;
+ if (time) {
+ while (chSysGetTime() < time) {
+#if defined(WIN32)
+ ChkIntSources();
+#endif
+ }
+ }
+ else {
+ while (chSysGetTime() > time) {
+#if defined(WIN32)
+ ChkIntSources();
+#endif
+ }
+ }
+ return time;
+}
+
/*
* Test suite execution.
*/
@@ -192,7 +218,7 @@ msg_t TestThread(void *p) {
#if DELAY_BETWEEN_TESTS > 0
chThdSleep(DELAY_BETWEEN_TESTS);
#endif
- test_println("------------------------------------------------------------");
+ test_println("---------------------------------------------------------------------------");
test_print("--- Test Case ");
test_printn(i + 1);
test_print(" (");
@@ -213,7 +239,7 @@ msg_t TestThread(void *p) {
test_println("--- Result: SUCCESS");
i++;
}
- test_println("------------------------------------------------------------");
+ test_println("---------------------------------------------------------------------------");
test_println("");
test_print("Final result: ");
if (global_fail)