summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-15 15:43:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-15 15:44:20 +0200
commitfc14d391bf61e16397231530b46ee1036a1c5f0d (patch)
tree6ac626f50d9ccf54d9a9f6b2611cead4e44da965
parentspec: Use design groups (diff)
downloadrtems-central-fc14d391bf61e16397231530b46ee1036a1c5f0d.tar.bz2
spec: Add unit test example
-rw-r--r--spec/score/msgq/unit/msgq.yml30
-rw-r--r--spec/testsuites/unit-0.yml24
-rw-r--r--spec/testsuites/unit-no-clock-0.yml27
3 files changed, 81 insertions, 0 deletions
diff --git a/spec/score/msgq/unit/msgq.yml b/spec/score/msgq/unit/msgq.yml
new file mode 100644
index 00000000..27d3fa82
--- /dev/null
+++ b/spec/score/msgq/unit/msgq.yml
@@ -0,0 +1,30 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-actions:
+- action-brief: |
+ TODO.
+ action-code: |
+ /* TODO */
+ checks: []
+ links:
+ - name: _CORE_message_queue_Insert_message
+ role: unit-test
+ uid: ../../if/domain
+test-brief: |
+ Unit tests for the Message Queue Handler.
+test-context: []
+test-context-support: null
+test-description: null
+test-header: null
+test-includes:
+- rtems/score/coremsgimpl.h
+test-local-includes: []
+test-setup: null
+test-stop: null
+test-support: null
+test-target: testsuites/unit/tc-score-msgq.c
+test-teardown: null
+type: test-case
diff --git a/spec/testsuites/unit-0.yml b/spec/testsuites/unit-0.yml
new file mode 100644
index 00000000..352f4c67
--- /dev/null
+++ b/spec/testsuites/unit-0.yml
@@ -0,0 +1,24 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+test-brief: |
+ This general purpose unit test suite provides enough resources to run
+ basic tests for all specified managers and functions.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define CONFIGURE_MAXIMUM_PROCESSORS 5
+
+ #include "../validation/ts-default.h"
+test-description: |
+ In SMP configurations, up to three scheduler instances using the SMP EDF
+ scheduler are provided using up to four processors.
+test-includes: []
+test-local-includes: []
+test-suite-name: Unit0
+test-target: testsuites/unit/ts-unit-0.c
+type: test-suite
diff --git a/spec/testsuites/unit-no-clock-0.yml b/spec/testsuites/unit-no-clock-0.yml
new file mode 100644
index 00000000..685daf90
--- /dev/null
+++ b/spec/testsuites/unit-no-clock-0.yml
@@ -0,0 +1,27 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+test-brief: |
+ This general purpose unit test suite provides enough resources to run
+ basic tests without a ${/glossary/clock-driver:/term} for all specified
+ managers and functions.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define CONFIGURE_MAXIMUM_PROCESSORS 4
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #include "../validation/ts-default.h"
+test-description: |
+ In SMP configurations, up to three scheduler instances using the SMP EDF
+ scheduler are provided using up to four processors.
+test-includes: []
+test-local-includes: []
+test-suite-name: UnitNoClock0
+test-target: testsuites/unit/ts-unit-no-clock-0.c
+type: test-suite