Added corebmk experiment.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14521 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
09ed00f52b
commit
2033af9d94
|
@ -51,4 +51,4 @@
|
|||
<resource resourceType="PROJECT" workspacePath="/RT-STM32G474RE-NUCLEO64"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
</cproject>
|
|
@ -1,19 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SPC5-Config version="1.0.0">
|
||||
<application name="ChibiOS/NIL Test Suite" version="1.0.0" standalone="true" locked="false">
|
||||
<description>Test Specification for ChibiOS/NIL.</description>
|
||||
<component id="org.chibios.spc5.components.portable.generic_startup">
|
||||
<component id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine" />
|
||||
</component>
|
||||
<instances>
|
||||
<instance locked="false" id="org.chibios.spc5.components.portable.generic_startup" />
|
||||
<instance locked="false" id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
|
||||
<description>
|
||||
<brief>
|
||||
<value>ChibiOS/NIL Test Suite.</value>
|
||||
</brief>
|
||||
<copyright>
|
||||
<value><![CDATA[/*
|
||||
|
||||
<instance locked="false"
|
||||
id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
|
||||
<description>
|
||||
<brief>
|
||||
<value>ChibiOS/NIL Test Suite.</value>
|
||||
</brief>
|
||||
<copyright>
|
||||
<value><![CDATA[/*
|
||||
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -28,77 +21,82 @@
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/]]></value>
|
||||
</copyright>
|
||||
<introduction>
|
||||
<value>Test suite for core benchmarks. The purpose of this suite is to perform general benchmarks in order to assess performance of cores and/or compilers.</value>
|
||||
</introduction>
|
||||
</description>
|
||||
<global_data_and_code>
|
||||
<code_prefix>
|
||||
<value>corebmk</value>
|
||||
</code_prefix>
|
||||
<global_definitions>
|
||||
<value><![CDATA[
|
||||
</copyright>
|
||||
<introduction>
|
||||
<value>Test suite for core benchmarks. The purpose of this suite
|
||||
is to perform general benchmarks in order to assess
|
||||
performance of cores and/or compilers.
|
||||
</value>
|
||||
</introduction>
|
||||
</description>
|
||||
<global_data_and_code>
|
||||
<code_prefix>
|
||||
<value>corebmk_</value>
|
||||
</code_prefix>
|
||||
<global_definitions>
|
||||
<value><![CDATA[
|
||||
/**/
|
||||
]]></value>
|
||||
</global_definitions>
|
||||
<global_code>
|
||||
<value><![CDATA[
|
||||
</global_definitions>
|
||||
<global_code>
|
||||
<value><![CDATA[
|
||||
/**/
|
||||
]]></value>
|
||||
</global_code>
|
||||
</global_data_and_code>
|
||||
<sequences>
|
||||
<sequence>
|
||||
<type index="0">
|
||||
<value>Internal Tests</value>
|
||||
</type>
|
||||
<brief>
|
||||
<value>Information.</value>
|
||||
</brief>
|
||||
<description>
|
||||
<value>This sequence reports configuration and version information about execution environment.</value>
|
||||
</description>
|
||||
<condition>
|
||||
<value />
|
||||
</condition>
|
||||
<shared_code>
|
||||
<value><![CDATA[
|
||||
</global_code>
|
||||
</global_data_and_code>
|
||||
<sequences>
|
||||
<sequence>
|
||||
<type index="0">
|
||||
<value>Internal Tests</value>
|
||||
</type>
|
||||
<brief>
|
||||
<value>Information.</value>
|
||||
</brief>
|
||||
<description>
|
||||
<value>This sequence reports configuration and version
|
||||
information about execution environment.
|
||||
</value>
|
||||
</description>
|
||||
<condition>
|
||||
<value />
|
||||
</condition>
|
||||
<shared_code>
|
||||
<value><![CDATA[
|
||||
#include "ch.h"
|
||||
]]></value>
|
||||
</shared_code>
|
||||
<cases>
|
||||
<case>
|
||||
<brief>
|
||||
<value>Environment Info.</value>
|
||||
</brief>
|
||||
<description>
|
||||
<value>Environment-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>Architecture and Compiler information.</value>
|
||||
</description>
|
||||
<tags>
|
||||
<value />
|
||||
</tags>
|
||||
<code>
|
||||
<value><![CDATA[
|
||||
</shared_code>
|
||||
<cases>
|
||||
<case>
|
||||
<brief>
|
||||
<value>Environment Info.</value>
|
||||
</brief>
|
||||
<description>
|
||||
<value>Environment-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>Architecture and Compiler information.</value>
|
||||
</description>
|
||||
<tags>
|
||||
<value />
|
||||
</tags>
|
||||
<code>
|
||||
<value><![CDATA[
|
||||
#if defined(PORT_ARCHITECTURE_NAME)
|
||||
test_print("--- Architecture: ");
|
||||
test_println(PORT_ARCHITECTURE_NAME);
|
||||
|
@ -131,15 +129,11 @@ test_printn(PORT_WORKING_AREA_ALIGN);
|
|||
test_println("");
|
||||
#endif
|
||||
]]></value>
|
||||
</code>
|
||||
</step>
|
||||
</steps>
|
||||
</case>
|
||||
</cases>
|
||||
</sequence>
|
||||
</sequences>
|
||||
</instance>
|
||||
</instances>
|
||||
<exportedFeatures />
|
||||
</application>
|
||||
</SPC5-Config>
|
||||
</code>
|
||||
</step>
|
||||
</steps>
|
||||
</case>
|
||||
</cases>
|
||||
</sequence>
|
||||
</sequences>
|
||||
</instance>
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2018 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @mainpage Test Suite Specification
|
||||
* Test suite for core benchmarks. The purpose of this suite is to
|
||||
* perform general benchmarks in order to assess performance of cores
|
||||
* and/or compilers.
|
||||
*
|
||||
* <h2>Test Sequences</h2>
|
||||
* - @subpage corebmk_test_sequence_001
|
||||
* .
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file corebmk_test_root.c
|
||||
* @brief Test Suite root structures code.
|
||||
*/
|
||||
|
||||
#include "hal.h"
|
||||
#include "corebmk_test_root.h"
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module exported variables. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Array of test sequences.
|
||||
*/
|
||||
const testsequence_t * const corebmk_test_suite_array[] = {
|
||||
&corebmk_test_sequence_001,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Test suite root structure.
|
||||
*/
|
||||
const testsuite_t corebmk_test_suite = {
|
||||
"ChibiOS/NIL Test Suite",
|
||||
corebmk_test_suite_array
|
||||
};
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Shared code. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**/
|
||||
|
||||
#endif /* !defined(__DOXYGEN__) */
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2018 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 corebmk_test_root.h
|
||||
* @brief Test Suite root structures header.
|
||||
*/
|
||||
|
||||
#ifndef COREBMK_TEST_ROOT_H
|
||||
#define COREBMK_TEST_ROOT_H
|
||||
|
||||
#include "ch_test.h"
|
||||
|
||||
#include "corebmk_test_sequence_001.h"
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
|
||||
/*===========================================================================*/
|
||||
/* External declarations. */
|
||||
/*===========================================================================*/
|
||||
|
||||
extern const testsuite_t corebmk_test_suite;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Shared definitions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**/
|
||||
|
||||
#endif /* !defined(__DOXYGEN__) */
|
||||
|
||||
#endif /* COREBMK_TEST_ROOT_H */
|
|
@ -0,0 +1,123 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2018 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 "corebmk_test_root.h"
|
||||
|
||||
/**
|
||||
* @file corebmk_test_sequence_001.c
|
||||
* @brief Test Sequence 001 code.
|
||||
*
|
||||
* @page corebmk_test_sequence_001 [1] Information
|
||||
*
|
||||
* File: @ref corebmk_test_sequence_001.c
|
||||
*
|
||||
* <h2>Description</h2>
|
||||
* This sequence reports configuration and version information about
|
||||
* execution environment.
|
||||
*
|
||||
* <h2>Test Cases</h2>
|
||||
* - @subpage corebmk_test_001_001
|
||||
* .
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Shared code.
|
||||
****************************************************************************/
|
||||
|
||||
#include "ch.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Test cases.
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @page corebmk_test_001_001 [1.1] Environment Info
|
||||
*
|
||||
* <h2>Description</h2>
|
||||
* Environment-related info are reported.
|
||||
*
|
||||
* <h2>Test Steps</h2>
|
||||
* - [1.1.1] Architecture and Compiler information.
|
||||
* .
|
||||
*/
|
||||
|
||||
static void corebmk_test_001_001_execute(void) {
|
||||
|
||||
/* [1.1.1] Architecture and Compiler information.*/
|
||||
test_set_step(1);
|
||||
{
|
||||
#if defined(PORT_ARCHITECTURE_NAME)
|
||||
test_print("--- Architecture: ");
|
||||
test_println(PORT_ARCHITECTURE_NAME);
|
||||
#endif
|
||||
#if defined(PORT_CORE_VARIANT_NAME)
|
||||
test_print("--- Core Variant: ");
|
||||
test_println(PORT_CORE_VARIANT_NAME);
|
||||
#endif
|
||||
#if defined(PORT_COMPILER_NAME)
|
||||
test_print("--- Compiler: ");
|
||||
test_println(PORT_COMPILER_NAME);
|
||||
#endif
|
||||
#if defined(PORT_INFO)
|
||||
test_print("--- Port Info: ");
|
||||
test_println(PORT_INFO);
|
||||
#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
|
||||
}
|
||||
test_end_step(1);
|
||||
}
|
||||
|
||||
static const testcase_t corebmk_test_001_001 = {
|
||||
"Environment Info",
|
||||
NULL,
|
||||
NULL,
|
||||
corebmk_test_001_001_execute
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Exported data.
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @brief Array of test cases.
|
||||
*/
|
||||
const testcase_t * const corebmk_test_sequence_001_array[] = {
|
||||
&corebmk_test_001_001,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Information.
|
||||
*/
|
||||
const testsequence_t corebmk_test_sequence_001 = {
|
||||
"Information",
|
||||
corebmk_test_sequence_001_array
|
||||
};
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2018 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 corebmk_test_sequence_001.h
|
||||
* @brief Test Sequence 001 header.
|
||||
*/
|
||||
|
||||
#ifndef COREBMK_TEST_SEQUENCE_001_H
|
||||
#define COREBMK_TEST_SEQUENCE_001_H
|
||||
|
||||
extern const testsequence_t corebmk_test_sequence_001;
|
||||
|
||||
#endif /* COREBMK_TEST_SEQUENCE_001_H */
|
|
@ -15,12 +15,16 @@
|
|||
limitations under the License.
|
||||
--]
|
||||
[#import "/@ftllibs/libutils.ftl" as utils /]
|
||||
[#list xml.*.application.instances.instance as inst]
|
||||
[#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
|
||||
[#assign instance = inst /]
|
||||
[#break]
|
||||
[/#if]
|
||||
[/#list]
|
||||
[#if xml.instance[0]??]
|
||||
[#assign instance = xml.instance /]
|
||||
[#else]
|
||||
[#list xml.*.application.instances.instance as inst]
|
||||
[#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
|
||||
[#assign instance = inst /]
|
||||
[#break]
|
||||
[/#if]
|
||||
[/#list]
|
||||
[/#if]
|
||||
[#assign conf = {"instance":instance} /]
|
||||
[#assign prefix_lower = conf.instance.global_data_and_code.code_prefix.value[0]?trim?lower_case /]
|
||||
[#assign prefix_upper = conf.instance.global_data_and_code.code_prefix.value[0]?trim?upper_case /]
|
||||
|
|
|
@ -15,12 +15,16 @@
|
|||
limitations under the License.
|
||||
--]
|
||||
[#import "/@ftllibs/libutils.ftl" as utils /]
|
||||
[#list xml.*.application.instances.instance as inst]
|
||||
[#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
|
||||
[#assign instance = inst /]
|
||||
[#break]
|
||||
[/#if]
|
||||
[/#list]
|
||||
[#if xml.instance[0]??]
|
||||
[#assign instance = xml.instance /]
|
||||
[#else]
|
||||
[#list xml.*.application.instances.instance as inst]
|
||||
[#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
|
||||
[#assign instance = inst /]
|
||||
[#break]
|
||||
[/#if]
|
||||
[/#list]
|
||||
[/#if]
|
||||
[#assign conf = {"instance":instance} /]
|
||||
[#assign prefix_lower = conf.instance.global_data_and_code.code_prefix.value[0]?trim?lower_case /]
|
||||
[#assign prefix_upper = conf.instance.global_data_and_code.code_prefix.value[0]?trim?upper_case /]
|
||||
|
|
|
@ -16,12 +16,16 @@
|
|||
--]
|
||||
[#import "/@ftllibs/libutils.ftl" as utils /]
|
||||
[@pp.dropOutputFile /]
|
||||
[#list xml.*.application.instances.instance as inst]
|
||||
[#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
|
||||
[#assign instance = inst /]
|
||||
[#break]
|
||||
[/#if]
|
||||
[/#list]
|
||||
[#if xml.instance[0]??]
|
||||
[#assign instance = xml.instance /]
|
||||
[#else]
|
||||
[#list xml.*.application.instances.instance as inst]
|
||||
[#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
|
||||
[#assign instance = inst /]
|
||||
[#break]
|
||||
[/#if]
|
||||
[/#list]
|
||||
[/#if]
|
||||
[#assign conf = {"instance":instance} /]
|
||||
[#assign prefix_lower = conf.instance.global_data_and_code.code_prefix.value[0]?trim?lower_case /]
|
||||
[#assign prefix_upper = conf.instance.global_data_and_code.code_prefix.value[0]?trim?upper_case /]
|
||||
|
|
|
@ -16,12 +16,16 @@
|
|||
--]
|
||||
[#import "/@ftllibs/libutils.ftl" as utils /]
|
||||
[@pp.dropOutputFile /]
|
||||
[#list xml.*.application.instances.instance as inst]
|
||||
[#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
|
||||
[#assign instance = inst /]
|
||||
[#break]
|
||||
[/#if]
|
||||
[/#list]
|
||||
[#if xml.instance[0]??]
|
||||
[#assign instance = xml.instance /]
|
||||
[#else]
|
||||
[#list xml.*.application.instances.instance as inst]
|
||||
[#if inst.@id?string == "org.chibios.spc5.components.portable.chibios_unitary_tests_engine"]
|
||||
[#assign instance = inst /]
|
||||
[#break]
|
||||
[/#if]
|
||||
[/#list]
|
||||
[/#if]
|
||||
[#assign conf = {"instance":instance} /]
|
||||
[#assign prefix_lower = conf.instance.global_data_and_code.code_prefix.value[0]?trim?lower_case /]
|
||||
[#assign prefix_upper =conf. instance.global_data_and_code.code_prefix.value[0]?trim?upper_case /]
|
||||
|
|
Loading…
Reference in New Issue