]> rtime.felk.cvut.cz Git - arc.git/blobdiff - system/kernel/testsystem/os_test.h
Renamed USE_DEBUG to USE_DEBUG_PRINT, for now. Updates to kernel testsystem and kernel.
[arc.git] / system / kernel / testsystem / os_test.h
index 302e7d5af8651e5a971e50f5d346febc8ded4599..2db8e751428a9c29c3ec4148e878c7de28fadc69 100644 (file)
 #ifndef OS_TEST_H_\r
 #define OS_TEST_H_\r
 \r
-#include "test_framework.h"\r
+#include "test_framework.h"
+#include "Trace.h"\r
 \r
 typedef void (*test_func_t)( void );\r
 \r
 #define TEST_FAIL(_text)               test_fail((_text),  __FILE__,  __LINE__, __FUNCTION__ )\r
 #define TEST_OK()                              test_ok();\r
-#define TEST_ASSERT(_cond)                     if(!(_cond)) { TEST_FAIL(#_cond); }\r
+#define TEST_ASSERT(_cond)                     if(!(_cond)) { TEST_FAIL(#_cond); }
+#define TEST_RUN()                             dbg_printf("Running test %d\n",test_nr);
+\r
 \r
 extern int test_suite;\r
 extern int test_nr;
@@ -41,6 +44,15 @@ extern int test_nr;
 \r
 #define SECTION_BSS_SUPER      __attribute__ ((aligned (16),section(".bss")))\r
 #define SECTION_BSS_USER       __attribute__ ((aligned (16),section(".bss")))\r
+
+#define OS_STR__(x)            #x
+#define OS_STRSTR__(x)         OS_STR__(x)
+
+#define DECLARE_TEST_BTASK(_nr, _task1, _task2, _task3 ) \
+               __attribute__ ((section (".test_btask"))) const test_func_t btask_sup_matrix_ ## _nr[3] = { _task1, _task2, _task3 }
+
+#define DECLARE_TEST_ETASK(_nr, _task1, _task2, _task3 ) \
+               __attribute__ ((section (".test_etask"))) const test_func_t etask_sup_matrix_ ## _nr[3]  = { _task1, _task2, _task3 }
 \r
 #define DECLARE_TASKS(_nr) \\r
        void etask_sup_l_##_nr( void ); \\r