aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-12-07 08:55:48 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-12-07 08:55:48 +0000
commit2cf8a7897b9bd9b38cdde479a71f7980bb753d3f (patch)
treeb4f5e70cc69f0349bee6b5cc53a10c3cef24cbdd /test
parent35328c52fe6c351092b2f51a394d696fdf98f250 (diff)
downloadChibiOS-2cf8a7897b9bd9b38cdde479a71f7980bb753d3f.tar.gz
ChibiOS-2cf8a7897b9bd9b38cdde479a71f7980bb753d3f.tar.bz2
ChibiOS-2cf8a7897b9bd9b38cdde479a71f7980bb753d3f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11128 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r--test/rt/configuration.xml57
-rw-r--r--test/rt/source/test/rt_test_sequence_001.c71
2 files changed, 118 insertions, 10 deletions
diff --git a/test/rt/configuration.xml b/test/rt/configuration.xml
index 3aca04d0a..20fc7ea0b 100644
--- a/test/rt/configuration.xml
+++ b/test/rt/configuration.xml
@@ -170,6 +170,63 @@ systime_t test_wait_tick(void) {
<cases>
<case>
<brief>
+ <value>Port Info.</value>
+ </brief>
+ <description>
+ <value>Port-related info are reported.</value>
+ </description>
+ <condition>
+ <value />
+ </condition>
+ <various_code>
+ <setup_code>
+ <value />
+ </setup_code>
+ <teardown_code>
+ <value />
+ </teardown_code>
+ <local_variables>
+ <value />
+ </local_variables>
+ </various_code>
+ <steps>
+ <step>
+ <description>
+ <value>Prints the version string.</value>
+ </description>
+ <tags>
+ <value />
+ </tags>
+ <code>
+ <value><![CDATA[#if defined(PORT_ARCHITECTURE_NAME)
+test_print("--- Architecture: ");
+test_println(PORT_ARCHITECTURE_NAME);
+#endif
+#if defined(PORT_COMPILER_NAME)
+test_print("--- Compiler: ");
+test_println(PORT_COMPILER_NAME);
+#endif
+#if defined(PORT_NATURAL_ALIGN)
+test_print("--- Natural alignment: ");
+test_printn(PORT_NATURAL_ALIGN);
+test_println("");
+#endif
+#if defined(PORT_STACK_ALIGN)
+test_print("--- Stack alignment: ");
+test_printn(PORT_STACK_ALIGN);
+test_println("");
+#endif
+#if defined(PORT_WORKING_AREA_ALIGN)
+test_print("--- Working area alignment: ");
+test_printn(PORT_WORKING_AREA_ALIGN);
+test_println("");
+#endif]]></value>
+ </code>
+ </step>
+ </steps>
+ </case>
+ <case>
+ <brief>
<value>Kernel Info.</value>
</brief>
<description>
diff --git a/test/rt/source/test/rt_test_sequence_001.c b/test/rt/source/test/rt_test_sequence_001.c
index f5f726414..3e07198a4 100644
--- a/test/rt/source/test/rt_test_sequence_001.c
+++ b/test/rt/source/test/rt_test_sequence_001.c
@@ -32,6 +32,7 @@
* <h2>Test Cases</h2>
* - @subpage rt_test_001_001
* - @subpage rt_test_001_002
+ * - @subpage rt_test_001_003
* .
*/
@@ -46,10 +47,10 @@
****************************************************************************/
/**
- * @page rt_test_001_001 [1.1] Kernel Info
+ * @page rt_test_001_001 [1.1] Port Info
*
* <h2>Description</h2>
- * The version numbers are reported.
+ * Port-related info are reported.
*
* <h2>Test Steps</h2>
* - [1.1.1] Prints the version string.
@@ -61,6 +62,55 @@ static void rt_test_001_001_execute(void) {
/* [1.1.1] Prints the version string.*/
test_set_step(1);
{
+#if defined(PORT_ARCHITECTURE_NAME)
+ test_print("--- Architecture: ");
+ test_println(PORT_ARCHITECTURE_NAME);
+#endif
+#if defined(PORT_COMPILER_NAME)
+ test_print("--- Compiler: ");
+ test_println(PORT_COMPILER_NAME);
+#endif
+#if defined(PORT_NATURAL_ALIGN)
+ test_print("--- Natural alignment: ");
+ test_printn(PORT_NATURAL_ALIGN);
+ test_println("");
+#endif
+#if defined(PORT_STACK_ALIGN)
+ test_print("--- Stack alignment: ");
+ test_printn(PORT_STACK_ALIGN);
+ test_println("");
+#endif
+#if defined(PORT_WORKING_AREA_ALIGN)
+ test_print("--- Working area alignment: ");
+ test_printn(PORT_WORKING_AREA_ALIGN);
+ test_println("");
+#endif
+ }
+}
+
+static const testcase_t rt_test_001_001 = {
+ "Port Info",
+ NULL,
+ NULL,
+ rt_test_001_001_execute
+};
+
+/**
+ * @page rt_test_001_002 [1.2] Kernel Info
+ *
+ * <h2>Description</h2>
+ * The version numbers are reported.
+ *
+ * <h2>Test Steps</h2>
+ * - [1.2.1] Prints the version string.
+ * .
+ */
+
+static void rt_test_001_002_execute(void) {
+
+ /* [1.2.1] Prints the version string.*/
+ test_set_step(1);
+ {
test_println("--- Product: ChibiOS/RT");
test_print("--- Stable Flag: ");
test_printn(CH_KERNEL_STABLE);
@@ -79,27 +129,27 @@ static void rt_test_001_001_execute(void) {
}
}
-static const testcase_t rt_test_001_001 = {
+static const testcase_t rt_test_001_002 = {
"Kernel Info",
NULL,
NULL,
- rt_test_001_001_execute
+ rt_test_001_002_execute
};
/**
- * @page rt_test_001_002 [1.2] Kernel Settings
+ * @page rt_test_001_003 [1.3] Kernel Settings
*
* <h2>Description</h2>
* The static kernel settings are reported.
*
* <h2>Test Steps</h2>
- * - [1.2.1] Prints the configuration options settings.
+ * - [1.3.1] Prints the configuration options settings.
* .
*/
-static void rt_test_001_002_execute(void) {
+static void rt_test_001_003_execute(void) {
- /* [1.2.1] Prints the configuration options settings.*/
+ /* [1.3.1] Prints the configuration options settings.*/
test_set_step(1);
{
test_print("--- CH_CFG_ST_RESOLUTION: ");
@@ -207,11 +257,11 @@ static void rt_test_001_002_execute(void) {
}
}
-static const testcase_t rt_test_001_002 = {
+static const testcase_t rt_test_001_003 = {
"Kernel Settings",
NULL,
NULL,
- rt_test_001_002_execute
+ rt_test_001_003_execute
};
/****************************************************************************
@@ -224,6 +274,7 @@ static const testcase_t rt_test_001_002 = {
const testcase_t * const rt_test_sequence_001_array[] = {
&rt_test_001_001,
&rt_test_001_002,
+ &rt_test_001_003,
NULL
};