From 7f3221216d3e50c69db7d3f08595db7cfccd4424 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 10 Feb 2014 15:47:18 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6698 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/lib/templates/test_sequence_XXX.c | 26 +++++++++--------- test/nil/test.mk | 4 +-- test/nil/test_root.c | 2 +- test/nil/test_root.h | 2 +- test/nil/test_sequence_001.c | 30 ++++++++++----------- test/nil/test_sequence_001.h | 8 +++--- test/nil/test_sequence_002.c | 49 +++++++++++++++++----------------- test/nil/test_sequence_002.h | 8 +++--- 8 files changed, 65 insertions(+), 64 deletions(-) diff --git a/test/lib/templates/test_sequence_XXX.c b/test/lib/templates/test_sequence_XXX.c index 6ff377e94..af16e544e 100644 --- a/test/lib/templates/test_sequence_XXX.c +++ b/test/lib/templates/test_sequence_XXX.c @@ -27,7 +27,7 @@ * Sequence detailed description. * *

Test Cases

- * - @subpage test_XXX_000 + * - @subpage test_XXX_001 * . */ @@ -42,7 +42,7 @@ #if TEST_XXX_000_CONDITION || defined(__DOXYGEN__) /** - * @page test_XXX_000 Brief description + * @page test_XXX_001 Brief description * *

Description

* Detailed description. @@ -50,7 +50,7 @@ *

Conditions

* This test is only executed if the following preprocessor condition * evaluates to true: - * - TEST_XXX_000_CONDITION + * - TEST_XXX_001_CONDITION * . * *

Test Steps

@@ -58,15 +58,15 @@ * . */ -static void test_XXX_000_setup(void) { +static void test_XXX_001_setup(void) { } -static void test_XXX_000_teardown(void) { +static void test_XXX_001_teardown(void) { } -static void test_XXX_000_execute(void) { +static void test_XXX_001_execute(void) { /* Step description.*/ test_set_step(1); @@ -74,13 +74,13 @@ static void test_XXX_000_execute(void) { } } -static const testcase_t test_XXX_000 = { +static const testcase_t test_XXX_001 = { "Brief description", - test_XXX_000_setup, - test_XXX_000_teardown, - test_XXX_000_execute + test_XXX_001_setup, + test_XXX_001_teardown, + test_XXX_001_execute }; -#endif /* TEST_XXX_000_CONDITION */ +#endif /* TEST_XXX_001_CONDITION */ /**************************************************************************** * Exported data. @@ -90,8 +90,8 @@ static const testcase_t test_XXX_000 = { * @brief Sequence brief description. */ const testcase_t * const test_sequence_XXX[] = { -#if TEST_XXX_000_CONDITION || defined(__DOXYGEN__) - &test_XXX_000, +#if TEST_XXX_001_CONDITION || defined(__DOXYGEN__) + &test_XXX_001, #endif NULL }; diff --git a/test/nil/test.mk b/test/nil/test.mk index 1cb5641cf..b0da9731a 100644 --- a/test/nil/test.mk +++ b/test/nil/test.mk @@ -1,8 +1,8 @@ # List of all the ChibiOS/RT test files. TESTSRC = ${CHIBIOS}/test/lib/ch_test.c \ ${CHIBIOS}/test/nil/test_root.c \ - ${CHIBIOS}/test/nil/test_sequence_000.c \ - ${CHIBIOS}/test/nil/test_sequence_001.c + ${CHIBIOS}/test/nil/test_sequence_001.c \ + ${CHIBIOS}/test/nil/test_sequence_002.c # Required include directories TESTINC = ${CHIBIOS}/test/lib \ diff --git a/test/nil/test_root.c b/test/nil/test_root.c index 94f88f2a4..fb835b88d 100644 --- a/test/nil/test_root.c +++ b/test/nil/test_root.c @@ -34,8 +34,8 @@ * @brief Array of all the test sequences. */ const testcase_t * const *test_suite[] = { - test_sequence_000, test_sequence_001, + test_sequence_002, NULL }; diff --git a/test/nil/test_root.h b/test/nil/test_root.h index 58e0790a4..0d000c415 100644 --- a/test/nil/test_root.h +++ b/test/nil/test_root.h @@ -27,8 +27,8 @@ #include "nil.h" -#include "test_sequence_000.h" #include "test_sequence_001.h" +#include "test_sequence_002.h" /*===========================================================================*/ /* Default definitions. */ diff --git a/test/nil/test_sequence_001.c b/test/nil/test_sequence_001.c index 6d1dede6c..7d967ef0d 100644 --- a/test/nil/test_sequence_001.c +++ b/test/nil/test_sequence_001.c @@ -19,16 +19,16 @@ #include "test_root.h" /** - * @page test_sequence_000 Threads Functionality + * @page test_sequence_001 Threads Functionality * - * File: @ref test_sequence_000.c + * File: @ref test_sequence_001.c * *

Description

* This sequence tests the ChibiOS/NIL functionalities related to threading. * *

Test Cases

- * - @subpage test_000_000 - * - @subpage test_000_001 + * - @subpage test_001_001 + * - @subpage test_001_002 * . */ @@ -43,7 +43,7 @@ #if TRUE || defined(__DOXYGEN__) /** - * @page test_000_000 System Tick Counter functionality + * @page test_001_001 System Tick Counter functionality * *

Description

* The functionality of the API @p chVTGetSystemTimeX() is tested. @@ -57,7 +57,7 @@ * . */ -static void test_000_000_execute(void) { +static void test_001_001_execute(void) { systime_t time; /* A System Tick Counter increment is expected, the test simply hangs if @@ -70,17 +70,17 @@ static void test_000_000_execute(void) { } } -static const testcase_t test_000_000 = { +static const testcase_t test_001_001 = { "System Tick Counter functionality", NULL, NULL, - test_000_000_execute + test_001_001_execute }; #endif /* TRUE */ #if TRUE || defined(__DOXYGEN__) /** - * @page test_000_001 Thread Sleep functionality + * @page test_001_002 Thread Sleep functionality * *

Description

* The functionality of the API @p chThdSleep() and derivatives is tested. @@ -100,7 +100,7 @@ static const testcase_t test_000_000 = { * . */ -static void test_000_001_execute(void) { +static void test_001_002_execute(void) { systime_t time; /* The current system time is read then a sleep is performed for 100 system @@ -157,11 +157,11 @@ static void test_000_001_execute(void) { } } -static const testcase_t test_000_001 = { +static const testcase_t test_001_002 = { "Thread Sleep functionality", NULL, NULL, - test_000_001_execute + test_001_002_execute }; #endif /* TRUE */ @@ -172,12 +172,12 @@ static const testcase_t test_000_001 = { /** * @brief Sequence brief description. */ -const testcase_t * const test_sequence_000[] = { +const testcase_t * const test_sequence_001[] = { #if TRUE || defined(__DOXYGEN__) - &test_000_000, + &test_001_001, #endif #if TRUE || defined(__DOXYGEN__) - &test_000_001, + &test_001_002, #endif NULL }; diff --git a/test/nil/test_sequence_001.h b/test/nil/test_sequence_001.h index 72aaaf374..47ae8315b 100644 --- a/test/nil/test_sequence_001.h +++ b/test/nil/test_sequence_001.h @@ -14,9 +14,9 @@ limitations under the License. */ -#ifndef _TEST_SEQUENCE_000_H_ -#define _TEST_SEQUENCE_000_H_ +#ifndef _TEST_SEQUENCE_001_H_ +#define _TEST_SEQUENCE_001_H_ -extern const testcase_t * const test_sequence_000[]; +extern const testcase_t * const test_sequence_001[]; -#endif /* _TEST_SEQUENCE_000_H_ */ +#endif /* _TEST_SEQUENCE_001_H_ */ diff --git a/test/nil/test_sequence_002.c b/test/nil/test_sequence_002.c index 0157541d5..cc9f03b08 100644 --- a/test/nil/test_sequence_002.c +++ b/test/nil/test_sequence_002.c @@ -19,15 +19,16 @@ #include "test_root.h" /** - * @page test_sequence_001 Semaphores functionality + * @page test_sequence_002 Semaphores functionality * - * File: @ref test_sequence_001.c + * File: @ref test_sequence_002.c * *

Description

* This sequence tests the ChibiOS/NIL functionalities related to semaphores. * *

Test Cases

- * - @subpage test_001_000 + * - @subpage test_002_001 + * - @subpage test_002_002 * . */ @@ -43,7 +44,7 @@ static semaphore_t sem1; #if TRUE || defined(__DOXYGEN__) /** - * @page test_001_000 Semaphores primitives, no state change + * @page test_002_001 Semaphore primitives, no state change * *

Description

* Wait, Signal and Reset primitives are tested. The testing thread does not @@ -62,17 +63,17 @@ static semaphore_t sem1; * . */ -static void test_001_000_setup(void) { +static void test_002_001_setup(void) { chSemObjectInit(&sem1, 1); } -static void test_001_000_teardown(void) { +static void test_002_001_teardown(void) { chSemReset(&sem1, 0); } -static void test_001_000_execute(void) { +static void test_002_001_execute(void) { /* The function chSemWait() is invoked, the Semaphore counter is tested for correct value after the call.*/ @@ -102,17 +103,17 @@ static void test_001_000_execute(void) { } } -static const testcase_t test_001_000 = { - "Brief description", - test_001_000_setup, - test_001_000_teardown, - test_001_000_execute +static const testcase_t test_002_001 = { + "semaphore primitives, no state change", + test_002_001_setup, + test_002_001_teardown, + test_002_001_execute }; #endif /* TRUE */ #if TRUE || defined(__DOXYGEN__) /** - * @page test_001_000 Semaphores timeout + * @page test_002_002 Semaphore timeouts * *

Description

* Timeouts on semaphores are tested. @@ -126,17 +127,17 @@ static const testcase_t test_001_000 = { * . */ -static void test_001_001_setup(void) { +static void test_002_002_setup(void) { chSemObjectInit(&sem1, 0); } -static void test_001_001_teardown(void) { +static void test_002_002_teardown(void) { chSemReset(&sem1, 0); } -static void test_001_001_execute(void) { +static void test_002_002_execute(void) { systime_t time; msg_t msg; @@ -156,11 +157,11 @@ static void test_001_001_execute(void) { } } -static const testcase_t test_001_001 = { - "Brief description", - test_001_001_setup, - test_001_001_teardown, - test_001_001_execute +static const testcase_t test_002_002 = { + "semaphore timeouts", + test_002_002_setup, + test_002_002_teardown, + test_002_002_execute }; #endif /* TRUE */ @@ -171,12 +172,12 @@ static const testcase_t test_001_001 = { /** * @brief Sequence brief description. */ -const testcase_t * const test_sequence_001[] = { +const testcase_t * const test_sequence_002[] = { #if TRUE || defined(__DOXYGEN__) - &test_001_000, + &test_002_001, #endif #if TRUE || defined(__DOXYGEN__) - &test_001_001, + &test_002_002, #endif NULL }; diff --git a/test/nil/test_sequence_002.h b/test/nil/test_sequence_002.h index 47ae8315b..e72d037e3 100644 --- a/test/nil/test_sequence_002.h +++ b/test/nil/test_sequence_002.h @@ -14,9 +14,9 @@ limitations under the License. */ -#ifndef _TEST_SEQUENCE_001_H_ -#define _TEST_SEQUENCE_001_H_ +#ifndef _TEST_SEQUENCE_002_H_ +#define _TEST_SEQUENCE_002_H_ -extern const testcase_t * const test_sequence_001[]; +extern const testcase_t * const test_sequence_002[]; -#endif /* _TEST_SEQUENCE_001_H_ */ +#endif /* _TEST_SEQUENCE_002_H_ */ -- cgit v1.2.3