Improved test specifications generation.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9221 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2016-04-02 10:34:01 +00:00
parent 9ab3be39cb
commit 4c9f1963a9
55 changed files with 337 additions and 25 deletions

View File

@ -94,7 +94,7 @@ void nvicSetSystemHandlerPriority(uint32_t handler, uint32_t prio) {
#if defined(__CORE_CM0_H_GENERIC)
SCB->SHP[_SHP_IDX(handler)] = (SCB->SHP[_SHP_IDX(handler)] & ~(0xFFU << _BIT_SHIFT(handler))) |
(NVIC_PRIORITY_MASK(prio) << _BIT_SHIFT(handler));
#elif defined(_CORE_CM7_HGENERIC)
#elif defined(__CORE_CM7_H_GENERIC)
SCB->SHPR[handler] = NVIC_PRIORITY_MASK(prio);
#else
SCB->SHP[handler] = NVIC_PRIORITY_MASK(prio);

View File

@ -5,8 +5,8 @@
* @brief Test Suite root structures header.
*/
#ifndef _SPC5_TEST_ROOT_H_
#define _SPC5_TEST_ROOT_H_
#ifndef TEST_ROOT_H
#define TEST_ROOT_H
#include "test_sequence_001.h"
#include "test_sequence_002.h"
@ -46,4 +46,4 @@ extern THD_WORKING_AREA(wa_test4, TASKS_STACK_SIZE);
#endif /* !defined(__DOXYGEN__) */
#endif /* _SPC5_TEST_ROOT_H_ */
#endif /* TEST_ROOT_H */

View File

@ -5,6 +5,9 @@
#include "test_root.h"
/**
* @file test_sequence_001.c
* @brief Test Sequence 001 code.
*
* @page test_sequence_001 [1] Tasks Functionality
*
* File: @ref test_sequence_001.c

View File

@ -1,3 +1,13 @@
/* Copyright statement.*/
/**
* @file test_sequence_001.h
* @brief Test Sequence 001 header.
*/
#ifndef TEST_SEQUENCE_001_H
#define TEST_SEQUENCE_001_H
extern const testcase_t * const test_sequence_001[];
#endif /* TEST_SEQUENCE_001_H */

View File

@ -5,6 +5,9 @@
#include "test_root.h"
/**
* @file test_sequence_002.c
* @brief Test Sequence 002 code.
*
* @page test_sequence_002 [2] Queues Functionality
*
* File: @ref test_sequence_002.c

View File

@ -1,3 +1,13 @@
/* Copyright statement.*/
/**
* @file test_sequence_002.h
* @brief Test Sequence 002 header.
*/
#ifndef TEST_SEQUENCE_002_H
#define TEST_SEQUENCE_002_H
extern const testcase_t * const test_sequence_002[];
#endif /* TEST_SEQUENCE_002_H */

View File

@ -5,6 +5,9 @@
#include "test_root.h"
/**
* @file test_sequence_003.c
* @brief Test Sequence 003 code.
*
* @page test_sequence_003 [3] Timers Functionality
*
* File: @ref test_sequence_003.c

View File

@ -1,3 +1,13 @@
/* Copyright statement.*/
/**
* @file test_sequence_003.h
* @brief Test Sequence 003 header.
*/
#ifndef TEST_SEQUENCE_003_H
#define TEST_SEQUENCE_003_H
extern const testcase_t * const test_sequence_003[];
#endif /* TEST_SEQUENCE_003_H */

View File

@ -5,6 +5,9 @@
#include "test_root.h"
/**
* @file test_sequence_004.c
* @brief Test Sequence 004 code.
*
* @page test_sequence_004 [4] Binary Semaphores Functionality
*
* File: @ref test_sequence_004.c
@ -105,7 +108,7 @@ static void test_004_001_execute(void) {
an error is expected.*/
test_set_step(4);
{
#if 0 /* Semaphore name currently not implemented.*/
#if 0 /* Semaphore name currently not implemented.*/
int32 err;
err = OS_BinSemCreate(&bsid,
@ -113,7 +116,7 @@ static void test_004_001_execute(void) {
0,
0);
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
#endif
#endif
}
/* [4.1.5] OS_BinSemDelete() is invoked with timer_id set to -1, an
@ -137,10 +140,10 @@ static void test_004_001_execute(void) {
err = OS_BinSemCreate(&bsid1, "my semaphore", 0, 0);
test_assert(err == OS_SUCCESS, "semaphore creation failed");
#if 0 /* Semaphore name currently not implemented.*/
#if 0 /* Semaphore name currently not implemented.*/
err = OS_BinSemCreate(&bsid2, "my semaphore", 0, 0);
test_assert(err == OS_ERR_NAME_TAKEN, "name conflict not detected");
#endif
#endif
err = OS_BinSemDelete(bsid1);
test_assert(err == OS_SUCCESS, "semaphore deletion failed");

View File

@ -1,3 +1,13 @@
/* Copyright statement.*/
/**
* @file test_sequence_004.h
* @brief Test Sequence 004 header.
*/
#ifndef TEST_SEQUENCE_004_H
#define TEST_SEQUENCE_004_H
extern const testcase_t * const test_sequence_004[];
#endif /* TEST_SEQUENCE_004_H */

View File

@ -5,6 +5,9 @@
#include "test_root.h"
/**
* @file test_sequence_005.c
* @brief Test Sequence 005 code.
*
* @page test_sequence_005 [5] Counter Semaphores Functionality
*
* File: @ref test_sequence_005.c
@ -104,7 +107,7 @@ static void test_005_001_execute(void) {
name, an error is expected.*/
test_set_step(4);
{
#if 0 /* Semaphore name currently not implemented.*/
#if 0 /* Semaphore name currently not implemented.*/
int32 err;
err = OS_CountSemCreate(&csid,
@ -112,7 +115,7 @@ static void test_005_001_execute(void) {
0,
0);
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
#endif
#endif
}
/* [5.1.5] OS_CountSemDelete() is invoked with timer_id set to -1, an
@ -136,10 +139,10 @@ static void test_005_001_execute(void) {
err = OS_CountSemCreate(&csid1, "my semaphore", 0, 0);
test_assert(err == OS_SUCCESS, "semaphore creation failed");
#if 0 /* Semaphore name currently not implemented.*/
#if 0 /* Semaphore name currently not implemented.*/
err = OS_CountSemCreate(&csid2, "my semaphore", 0, 0);
test_assert(err == OS_ERR_NAME_TAKEN, "name conflict not detected");
#endif
#endif
err = OS_CountSemDelete(csid1);
test_assert(err == OS_SUCCESS, "semaphore deletion failed");

View File

@ -1,3 +1,13 @@
/* Copyright statement.*/
/**
* @file test_sequence_005.h
* @brief Test Sequence 005 header.
*/
#ifndef TEST_SEQUENCE_005_H
#define TEST_SEQUENCE_005_H
extern const testcase_t * const test_sequence_005[];
#endif /* TEST_SEQUENCE_005_H */

View File

@ -5,6 +5,9 @@
#include "test_root.h"
/**
* @file test_sequence_006.c
* @brief Test Sequence 006 code.
*
* @page test_sequence_006 [6] Mutex Semaphores Functionality
*
* File: @ref test_sequence_006.c
@ -85,14 +88,14 @@ static void test_006_001_execute(void) {
an error is expected.*/
test_set_step(3);
{
#if 0 /* Semaphore name currently not implemented.*/
#if 0 /* Semaphore name currently not implemented.*/
int32 err;
err = OS_MutSemCreate(&msid,
"very very long semaphore name", /* Error.*/
0);
test_assert(err == OS_ERR_NAME_TOO_LONG, "name limit not detected");
#endif
#endif
}
/* [6.1.4] OS_MutSemDelete() is invoked with timer_id set to -1, an
@ -116,10 +119,10 @@ static void test_006_001_execute(void) {
err = OS_MutSemCreate(&msid1, "my semaphore", 0);
test_assert(err == OS_SUCCESS, "semaphore creation failed");
#if 0 /* Semaphore name currently not implemented.*/
#if 0 /* Semaphore name currently not implemented.*/
err = OS_MutSemCreate(&msid2, "my semaphore", 0);
test_assert(err == OS_ERR_NAME_TAKEN, "name conflict not detected");
#endif
#endif
err = OS_MutSemDelete(msid1);
test_assert(err == OS_SUCCESS, "semaphore deletion failed");

View File

@ -1,3 +1,13 @@
/* Copyright statement.*/
/**
* @file test_sequence_006.h
* @brief Test Sequence 006 header.
*/
#ifndef TEST_SEQUENCE_006_H
#define TEST_SEQUENCE_006_H
extern const testcase_t * const test_sequence_006[];
#endif /* TEST_SEQUENCE_006_H */

View File

@ -675,7 +675,7 @@ SHOW_USED_FILES = NO
# (if specified).
# The default value is: YES.
SHOW_FILES = YES
SHOW_FILES = NO
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
# page. This will remove the Namespaces entry from the Quick Index and from the

View File

@ -19,8 +19,8 @@
* @brief Test Suite root structures header.
*/
#ifndef _SPC5_TEST_ROOT_H_
#define _SPC5_TEST_ROOT_H_
#ifndef TEST_ROOT_H
#define TEST_ROOT_H
#include "test_sequence_001.h"
#include "test_sequence_002.h"
@ -58,4 +58,4 @@ THD_FUNCTION(test_support, arg);
#endif /* !defined(__DOXYGEN__) */
#endif /* _SPC5_TEST_ROOT_H_ */
#endif /* TEST_ROOT_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_001.c
* @brief Test Sequence 001 code.
*
* @page test_sequence_001 [1] Threads Functionality
*
* File: @ref test_sequence_001.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_001.h
* @brief Test Sequence 001 header.
*/
#ifndef TEST_SEQUENCE_001_H
#define TEST_SEQUENCE_001_H
extern const testcase_t * const test_sequence_001[];
#endif /* TEST_SEQUENCE_001_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_002.c
* @brief Test Sequence 002 code.
*
* @page test_sequence_002 [2] Semaphores
*
* File: @ref test_sequence_002.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_002.h
* @brief Test Sequence 002 header.
*/
#ifndef TEST_SEQUENCE_002_H
#define TEST_SEQUENCE_002_H
extern const testcase_t * const test_sequence_002[];
#endif /* TEST_SEQUENCE_002_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_003.c
* @brief Test Sequence 003 code.
*
* @page test_sequence_003 [3] Suspend/Resume and Event Flags
*
* File: @ref test_sequence_003.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_003.h
* @brief Test Sequence 003 header.
*/
#ifndef TEST_SEQUENCE_003_H
#define TEST_SEQUENCE_003_H
extern const testcase_t * const test_sequence_003[];
#endif /* TEST_SEQUENCE_003_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_004.c
* @brief Test Sequence 004 code.
*
* @page test_sequence_004 [4] Mailboxes
*
* File: @ref test_sequence_004.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_004.h
* @brief Test Sequence 004 header.
*/
#ifndef TEST_SEQUENCE_004_H
#define TEST_SEQUENCE_004_H
extern const testcase_t * const test_sequence_004[];
#endif /* TEST_SEQUENCE_004_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_005.c
* @brief Test Sequence 005 code.
*
* @page test_sequence_005 [5] Memory Pools
*
* File: @ref test_sequence_005.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_005.h
* @brief Test Sequence 005 header.
*/
#ifndef TEST_SEQUENCE_005_H
#define TEST_SEQUENCE_005_H
extern const testcase_t * const test_sequence_005[];
#endif /* TEST_SEQUENCE_005_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_006.c
* @brief Test Sequence 006 code.
*
* @page test_sequence_006 [6] Memory Heaps
*
* File: @ref test_sequence_006.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_006.h
* @brief Test Sequence 006 header.
*/
#ifndef TEST_SEQUENCE_006_H
#define TEST_SEQUENCE_006_H
extern const testcase_t * const test_sequence_006[];
#endif /* TEST_SEQUENCE_006_H */

View File

@ -675,7 +675,7 @@ SHOW_USED_FILES = NO
# (if specified).
# The default value is: YES.
SHOW_FILES = YES
SHOW_FILES = NO
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
# page. This will remove the Namespaces entry from the Quick Index and from the

View File

@ -19,8 +19,8 @@
* @brief Test Suite root structures header.
*/
#ifndef _SPC5_TEST_ROOT_H_
#define _SPC5_TEST_ROOT_H_
#ifndef TEST_ROOT_H
#define TEST_ROOT_H
#include "test_sequence_001.h"
#include "test_sequence_002.h"
@ -108,4 +108,4 @@ systime_t test_wait_tick(void);
#endif /* !defined(__DOXYGEN__) */
#endif /* _SPC5_TEST_ROOT_H_ */
#endif /* TEST_ROOT_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_001.c
* @brief Test Sequence 001 code.
*
* @page test_sequence_001 [1] System layer and port interface
*
* File: @ref test_sequence_001.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_001.h
* @brief Test Sequence 001 header.
*/
#ifndef TEST_SEQUENCE_001_H
#define TEST_SEQUENCE_001_H
extern const testcase_t * const test_sequence_001[];
#endif /* TEST_SEQUENCE_001_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_002.c
* @brief Test Sequence 002 code.
*
* @page test_sequence_002 [2] Threads Functionality
*
* File: @ref test_sequence_002.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_002.h
* @brief Test Sequence 002 header.
*/
#ifndef TEST_SEQUENCE_002_H
#define TEST_SEQUENCE_002_H
extern const testcase_t * const test_sequence_002[];
#endif /* TEST_SEQUENCE_002_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_003.c
* @brief Test Sequence 003 code.
*
* @page test_sequence_003 [3] Suspend/Resume
*
* File: @ref test_sequence_003.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_003.h
* @brief Test Sequence 003 header.
*/
#ifndef TEST_SEQUENCE_003_H
#define TEST_SEQUENCE_003_H
extern const testcase_t * const test_sequence_003[];
#endif /* TEST_SEQUENCE_003_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_004.c
* @brief Test Sequence 004 code.
*
* @page test_sequence_004 [4] Counter and Binary Semaphores
*
* File: @ref test_sequence_004.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_004.h
* @brief Test Sequence 004 header.
*/
#ifndef TEST_SEQUENCE_004_H
#define TEST_SEQUENCE_004_H
extern const testcase_t * const test_sequence_004[];
#endif /* TEST_SEQUENCE_004_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_005.c
* @brief Test Sequence 005 code.
*
* @page test_sequence_005 [5] Mutexes, Condition Variables and Priority Inheritance
*
* File: @ref test_sequence_005.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_005.h
* @brief Test Sequence 005 header.
*/
#ifndef TEST_SEQUENCE_005_H
#define TEST_SEQUENCE_005_H
extern const testcase_t * const test_sequence_005[];
#endif /* TEST_SEQUENCE_005_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_006.c
* @brief Test Sequence 006 code.
*
* @page test_sequence_006 [6] Synchronous Messages
*
* File: @ref test_sequence_006.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_006.h
* @brief Test Sequence 006 header.
*/
#ifndef TEST_SEQUENCE_006_H
#define TEST_SEQUENCE_006_H
extern const testcase_t * const test_sequence_006[];
#endif /* TEST_SEQUENCE_006_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_007.c
* @brief Test Sequence 007 code.
*
* @page test_sequence_007 [7] Event Sources and Event Flags
*
* File: @ref test_sequence_007.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_007.h
* @brief Test Sequence 007 header.
*/
#ifndef TEST_SEQUENCE_007_H
#define TEST_SEQUENCE_007_H
extern const testcase_t * const test_sequence_007[];
#endif /* TEST_SEQUENCE_007_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_008.c
* @brief Test Sequence 008 code.
*
* @page test_sequence_008 [8] Mailboxes
*
* File: @ref test_sequence_008.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_008.h
* @brief Test Sequence 008 header.
*/
#ifndef TEST_SEQUENCE_008_H
#define TEST_SEQUENCE_008_H
extern const testcase_t * const test_sequence_008[];
#endif /* TEST_SEQUENCE_008_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_009.c
* @brief Test Sequence 009 code.
*
* @page test_sequence_009 [9] Memory Pools
*
* File: @ref test_sequence_009.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_009.h
* @brief Test Sequence 009 header.
*/
#ifndef TEST_SEQUENCE_009_H
#define TEST_SEQUENCE_009_H
extern const testcase_t * const test_sequence_009[];
#endif /* TEST_SEQUENCE_009_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_010.c
* @brief Test Sequence 010 code.
*
* @page test_sequence_010 [10] Memory Heaps
*
* File: @ref test_sequence_010.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_010.h
* @brief Test Sequence 010 header.
*/
#ifndef TEST_SEQUENCE_010_H
#define TEST_SEQUENCE_010_H
extern const testcase_t * const test_sequence_010[];
#endif /* TEST_SEQUENCE_010_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_011.c
* @brief Test Sequence 011 code.
*
* @page test_sequence_011 [11] Dynamic threads
*
* File: @ref test_sequence_011.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_011.h
* @brief Test Sequence 011 header.
*/
#ifndef TEST_SEQUENCE_011_H
#define TEST_SEQUENCE_011_H
extern const testcase_t * const test_sequence_011[];
#endif /* TEST_SEQUENCE_011_H */

View File

@ -19,6 +19,9 @@
#include "test_root.h"
/**
* @file test_sequence_012.c
* @brief Test Sequence 012 code.
*
* @page test_sequence_012 [12] Benchmarks
*
* File: @ref test_sequence_012.c

View File

@ -14,4 +14,14 @@
limitations under the License.
*/
/**
* @file test_sequence_012.h
* @brief Test Sequence 012 header.
*/
#ifndef TEST_SEQUENCE_012_H
#define TEST_SEQUENCE_012_H
extern const testcase_t * const test_sequence_012[];
#endif /* TEST_SEQUENCE_012_H */

View File

@ -675,7 +675,7 @@ SHOW_USED_FILES = NO
# (if specified).
# The default value is: YES.
SHOW_FILES = YES
SHOW_FILES = NO
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
# page. This will remove the Namespaces entry from the Quick Index and from the