From 99b4f26a6513bf2ab68a10165d786f2dbd7ccc50 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 24 Oct 2017 12:16:46 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10893 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/nasa_osal/configuration.xml | 3 + test/nasa_osal/source/test/nasa_osal_test_root.c | 2 +- test/nil/configuration.xml | 6 +- test/nil/source/test/nil_test_root.c | 2 +- test/oslib/.cproject | 2 +- test/oslib/configuration.xml | 27 ++++++++- test/oslib/source/test/oslib_test_root.c | 6 +- test/oslib/source/test/oslib_test_root.h | 1 + test/oslib/source/test/oslib_test_sequence_004.c | 72 ++++++++++++++++++++++++ test/oslib/source/test/oslib_test_sequence_004.h | 27 +++++++++ test/rt/configuration.xml | 19 ++++--- test/rt/source/test/rt_test_root.c | 2 +- 12 files changed, 150 insertions(+), 19 deletions(-) create mode 100644 test/oslib/source/test/oslib_test_sequence_004.c create mode 100644 test/oslib/source/test/oslib_test_sequence_004.h (limited to 'test') diff --git a/test/nasa_osal/configuration.xml b/test/nasa_osal/configuration.xml index 24a01ea67..f1b2a3aa2 100644 --- a/test/nasa_osal/configuration.xml +++ b/test/nasa_osal/configuration.xml @@ -9,6 +9,9 @@ + + NASA OSAL Test Suite. + diff --git a/test/nasa_osal/source/test/nasa_osal_test_root.c b/test/nasa_osal/source/test/nasa_osal_test_root.c index 9245eb8a7..2e6df7739 100644 --- a/test/nasa_osal/source/test/nasa_osal_test_root.c +++ b/test/nasa_osal/source/test/nasa_osal_test_root.c @@ -47,7 +47,7 @@ const testsequence_t * const nasa_osal_test_suite_array[] = { * @brief Test suite root structure. */ const testsuite_t nasa_osal_test_suite = { - "Test specification for the NASA OSAL ChibiOS extension.", + "NASA OSAL Test Suite", nasa_osal_test_suite_array }; diff --git a/test/nil/configuration.xml b/test/nil/configuration.xml index c18e8f181..3ed8e5892 100644 --- a/test/nil/configuration.xml +++ b/test/nil/configuration.xml @@ -9,6 +9,9 @@ + + ChibiOS/NIL Test Suite. + - - nil_ - diff --git a/test/nil/source/test/nil_test_root.c b/test/nil/source/test/nil_test_root.c index 4974bad56..a1590e012 100644 --- a/test/nil/source/test/nil_test_root.c +++ b/test/nil/source/test/nil_test_root.c @@ -59,7 +59,7 @@ const testsequence_t * const nil_test_suite_array[] = { * @brief Test suite root structure. */ const testsuite_t nil_test_suite = { - "Test Specification for ChibiOS/NIL.", + "ChibiOS/NIL Test Suite", nil_test_suite_array }; diff --git a/test/oslib/.cproject b/test/oslib/.cproject index 8168c2d37..3aa7e6222 100644 --- a/test/oslib/.cproject +++ b/test/oslib/.cproject @@ -36,8 +36,8 @@ - + diff --git a/test/oslib/configuration.xml b/test/oslib/configuration.xml index 1fcb47218..54f56fd90 100644 --- a/test/oslib/configuration.xml +++ b/test/oslib/configuration.xml @@ -1,7 +1,7 @@ - - ChibiOS OS Library Test Suite. + + Test Specification for ChibiOS OS Library. @@ -9,6 +9,9 @@ + + ChibiOS OS Library Test Suite. + @@ -946,6 +949,24 @@ test_assert(p1 == NULL, "allocation not failed");]]> + + + Internal Tests + + + Objects Factory. + + + This sequence tests the ChibiOS library functionalities related to the object factory. + + + (CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE) + + + + + + diff --git a/test/oslib/source/test/oslib_test_root.c b/test/oslib/source/test/oslib_test_root.c index 4da5bc8fb..e222dcd06 100644 --- a/test/oslib/source/test/oslib_test_root.c +++ b/test/oslib/source/test/oslib_test_root.c @@ -24,6 +24,7 @@ * - @subpage oslib_test_sequence_001 * - @subpage oslib_test_sequence_002 * - @subpage oslib_test_sequence_003 + * - @subpage oslib_test_sequence_004 * . */ @@ -53,6 +54,9 @@ const testsequence_t * const oslib_test_suite_array[] = { #endif #if (CH_CFG_USE_HEAP) || defined(__DOXYGEN__) &oslib_test_sequence_003, +#endif +#if ((CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE)) || defined(__DOXYGEN__) + &oslib_test_sequence_004, #endif NULL }; @@ -61,7 +65,7 @@ const testsequence_t * const oslib_test_suite_array[] = { * @brief Test suite root structure. */ const testsuite_t oslib_test_suite = { - "ChibiOS OS Library Test Suite.", + "ChibiOS OS Library Test Suite", oslib_test_suite_array }; diff --git a/test/oslib/source/test/oslib_test_root.h b/test/oslib/source/test/oslib_test_root.h index 6fa8fe58e..760ccddc8 100644 --- a/test/oslib/source/test/oslib_test_root.h +++ b/test/oslib/source/test/oslib_test_root.h @@ -27,6 +27,7 @@ #include "oslib_test_sequence_001.h" #include "oslib_test_sequence_002.h" #include "oslib_test_sequence_003.h" +#include "oslib_test_sequence_004.h" #if !defined(__DOXYGEN__) diff --git a/test/oslib/source/test/oslib_test_sequence_004.c b/test/oslib/source/test/oslib_test_sequence_004.c new file mode 100644 index 000000000..d43b9165f --- /dev/null +++ b/test/oslib/source/test/oslib_test_sequence_004.c @@ -0,0 +1,72 @@ +/* + ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" +#include "oslib_test_root.h" + +/** + * @file oslib_test_sequence_004.c + * @brief Test Sequence 004 code. + * + * @page oslib_test_sequence_004 [4] Objects Factory + * + * File: @ref oslib_test_sequence_004.c + * + *

Description

+ * This sequence tests the ChibiOS library functionalities related to + * the object factory. + * + *

Conditions

+ * This sequence is only executed if the following preprocessor condition + * evaluates to true: + * - (CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE) + * . + * + *

Test Cases

+ * No test cases defined in the test sequence. + */ + +#if ((CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE)) || defined(__DOXYGEN__) + +/**************************************************************************** + * Shared code. + ****************************************************************************/ + + +/**************************************************************************** + * Test cases. + ****************************************************************************/ + +/**************************************************************************** + * Exported data. + ****************************************************************************/ + +/** + * @brief Array of test cases. + */ +const testcase_t * const oslib_test_sequence_004_array[] = { + NULL +}; + +/** + * @brief Objects Factory. + */ +const testsequence_t oslib_test_sequence_004 = { + "Objects Factory", + oslib_test_sequence_004_array +}; + +#endif /* (CH_CFG_USE_FACTORY == TRUE) && (CH_CFG_USE_MEMPOOLS == TRUE) && (CH_CFG_USE_HEAP == TRUE) */ diff --git a/test/oslib/source/test/oslib_test_sequence_004.h b/test/oslib/source/test/oslib_test_sequence_004.h new file mode 100644 index 000000000..c301863f2 --- /dev/null +++ b/test/oslib/source/test/oslib_test_sequence_004.h @@ -0,0 +1,27 @@ +/* + ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file oslib_test_sequence_004.h + * @brief Test Sequence 004 header. + */ + +#ifndef OSLIB_TEST_SEQUENCE_004_H +#define OSLIB_TEST_SEQUENCE_004_H + +extern const testsequence_t oslib_test_sequence_004; + +#endif /* OSLIB_TEST_SEQUENCE_004_H */ diff --git a/test/rt/configuration.xml b/test/rt/configuration.xml index 7a39164d0..c25e56405 100644 --- a/test/rt/configuration.xml +++ b/test/rt/configuration.xml @@ -1,7 +1,7 @@ - ChibiOS/RT Test Suite. + Test Specification for ChibiOS/RT. @@ -9,6 +9,9 @@ + + ChibiOS/RT Test Suite. + @@ -1835,7 +1838,7 @@ test_assert_sequence("ABC", "invalid sequence");]]> - @@ -1901,7 +1904,7 @@ test_assert_sequence("ABCDE", "invalid sequence");]]> - @@ -2821,7 +2824,7 @@ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX() - 1,