git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6698 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2014-02-10 15:47:18 +00:00
parent be1b2cbd33
commit 7f3221216d
8 changed files with 65 additions and 64 deletions

View File

@ -27,7 +27,7 @@
* Sequence detailed description.
*
* <h2>Test Cases</h2>
* - @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
*
* <h2>Description</h2>
* Detailed description.
@ -50,7 +50,7 @@
* <h2>Conditions</h2>
* This test is only executed if the following preprocessor condition
* evaluates to true:
* - TEST_XXX_000_CONDITION
* - TEST_XXX_001_CONDITION
* .
*
* <h2>Test Steps</h2>
@ -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
};

View File

@ -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 \

View File

@ -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
};

View File

@ -27,8 +27,8 @@
#include "nil.h"
#include "test_sequence_000.h"
#include "test_sequence_001.h"
#include "test_sequence_002.h"
/*===========================================================================*/
/* Default definitions. */

View File

@ -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
*
* <h2>Description</h2>
* This sequence tests the ChibiOS/NIL functionalities related to threading.
*
* <h2>Test Cases</h2>
* - @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
*
* <h2>Description</h2>
* 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
*
* <h2>Description</h2>
* 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
};

View File

@ -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_ */

View File

@ -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
*
* <h2>Description</h2>
* This sequence tests the ChibiOS/NIL functionalities related to semaphores.
*
* <h2>Test Cases</h2>
* - @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
*
* <h2>Description</h2>
* 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
*
* <h2>Description</h2>
* 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
};

View File

@ -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_ */