From: batt Date: Thu, 28 Aug 2008 15:47:37 +0000 (+0000) Subject: Fix unit test check. X-Git-Tag: 2.0.0~187 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=760437314c9e9af5fad596121de78c332129d2f5;p=bertos.git Fix unit test check. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1747 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/app/battfs/battfs_test.c b/app/battfs/battfs_test.c index c59d9a95..839d7811 100644 --- a/app/battfs/battfs_test.c +++ b/app/battfs/battfs_test.c @@ -538,7 +538,7 @@ int battfs_testRun(void) return 0; } -#if (ARCH & ARCH_UNITTEST) +#if UNIT_TEST int battfs_testSetup(void) { diff --git a/bertos/cfg/test.h b/bertos/cfg/test.h index 85c4d427..b45515b0 100644 --- a/bertos/cfg/test.h +++ b/bertos/cfg/test.h @@ -71,7 +71,11 @@ #ifndef CFG_TEST_H #define CFG_TEST_H -#if (ARCH & ARCH_UNITTEST) +#include "cfg/cfg_arch.h" + +#if defined(ARCH_UNITTEST) && (ARCH & ARCH_UNITTEST) + + #define UNIT_TEST 1 /** * Macro used to generate a main() for a test to be compiled @@ -93,6 +97,7 @@ #define TEST_ONLY(file) PP_STRINGIZE(file) #else /* !_TEST */ + #define UNIT_TEST 0 #define TEST_MAIN(module) /* nothing */ #define TEST_ONLY(file) diff --git a/bertos/drv/lcd_hd44_test.c b/bertos/drv/lcd_hd44_test.c index 9fae8141..065cee51 100644 --- a/bertos/drv/lcd_hd44_test.c +++ b/bertos/drv/lcd_hd44_test.c @@ -40,11 +40,12 @@ #include "lcd_hd44.h" #include "hw/hw_lcd.h" +#include #include #warning TODO:Refactor this test to comply whit BeRTOS test policy. -#if (ARCH & ARCH_UNITTEST) +#if UNIT_TEST void lcd_hw_test(void) { diff --git a/bertos/kern/proc_test.c b/bertos/kern/proc_test.c index e0030b7f..52a7fe85 100644 --- a/bertos/kern/proc_test.c +++ b/bertos/kern/proc_test.c @@ -88,7 +88,7 @@ int proc_testRun(void) return 0; } -#if (ARCH & ARCH_UNITTEST) +#if UNIT_TEST int proc_testSetup(void) { diff --git a/bertos/mware/sprintf_test.c b/bertos/mware/sprintf_test.c index 8bcbabff..60958fc5 100644 --- a/bertos/mware/sprintf_test.c +++ b/bertos/mware/sprintf_test.c @@ -49,7 +49,7 @@ #warning FIXME:Review and refactor this test.. -#if (ARCH & ARCH_UNITTEST) +#if UNIT_TEST #include "sprintf.c" #include "formatwr.c" #include "hex.c"