[rtems-central commit] spec: Add unit test example

Sebastian Huber sebh at rtems.org
Wed Sep 15 13:42:37 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    fc14d391bf61e16397231530b46ee1036a1c5f0d
Changeset: http://git.rtems.org/rtems-central/commit/?id=fc14d391bf61e16397231530b46ee1036a1c5f0d

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Sep 15 15:43:33 2021 +0200

spec: Add unit test example

---

 spec/score/msgq/unit/msgq.yml       | 30 ++++++++++++++++++++++++++++++
 spec/testsuites/unit-0.yml          | 24 ++++++++++++++++++++++++
 spec/testsuites/unit-no-clock-0.yml | 27 +++++++++++++++++++++++++++
 3 files changed, 81 insertions(+)

diff --git a/spec/score/msgq/unit/msgq.yml b/spec/score/msgq/unit/msgq.yml
new file mode 100644
index 0000000..27d3fa8
--- /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 0000000..352f4c6
--- /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 0000000..685daf9
--- /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



More information about the vc mailing list