[rtems-central commit] spec: Add test suite name attribute

Sebastian Huber sebh at rtems.org
Fri Apr 30 05:02:48 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Apr 29 09:15:04 2021 +0200

spec: Add test suite name attribute

---

 generate_membench.py                        | 3 +++
 spec/dev/clock/val/mem-driver.yml           | 1 +
 spec/rtems/barrier/val/mem-wait-rel-del.yml | 1 +
 spec/rtems/barrier/val/mem-wait-rel.yml     | 1 +
 spec/rtems/event/val/mem-snd-rcv.yml        | 1 +
 spec/rtems/fatal/val/mem-fatal.yml          | 1 +
 spec/rtems/part/val/mem-get-ret-del.yml     | 1 +
 spec/rtems/part/val/mem-get-ret.yml         | 1 +
 spec/rtems/ratemon/val/mem-period-del.yml   | 1 +
 spec/rtems/ratemon/val/mem-period.yml       | 1 +
 spec/rtems/sem/val/mem-obt-rel-del.yml      | 1 +
 spec/rtems/sem/val/mem-obt-rel.yml          | 1 +
 spec/rtems/signal/val/mem-catch-snd.yml     | 1 +
 spec/rtems/task/val/mem-del.yml             | 1 +
 spec/rtems/task/val/mem-exit.yml            | 1 +
 spec/rtems/task/val/mem-restart.yml         | 1 +
 spec/rtems/task/val/mem-sus-res.yml         | 1 +
 spec/rtems/val/mem-basic.yml                | 1 +
 spec/rtems/val/mem-smp-1.yml                | 1 +
 spec/rtems/val/mem-smp-global-2.yml         | 1 +
 spec/rtems/val/mem-smp-global-4.yml         | 1 +
 spec/rtems/val/mem-smp-part-2.yml           | 1 +
 spec/rtems/val/mem-smp-part-4.yml           | 1 +
 spec/spec/test-suite.yml                    | 4 ++++
 spec/testsuites/model-0.yml                 | 3 ++-
 spec/testsuites/performance-0.yml           | 3 ++-
 spec/testsuites/validation-0.yml            | 3 ++-
 spec/testsuites/validation-1.yml            | 3 ++-
 spec/testsuites/validation-2.yml            | 3 ++-
 spec/testsuites/validation/profile.yml      | 3 ++-
 30 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/generate_membench.py b/generate_membench.py
index b7ac188..a80fc65 100755
--- a/generate_membench.py
+++ b/generate_membench.py
@@ -32,6 +32,7 @@ import sys
 import textwrap
 from typing import NamedTuple, List, Optional
 
+from rtemsspec.content import to_camel_case
 from rtemsspec.items import ItemCache
 from rtemsspec.membench import generate
 from rtemsspec.sphinxcontent import SphinxContent, SphinxMapper
@@ -487,6 +488,7 @@ type: requirement
 """)
         val_spec = f"spec/{test.path}/val/mem-{test.name}.yml"
         brief = _text(f"{_TEST} {test.topic}.")
+        test_suite_name = to_camel_case(f"Mem {test.name}")
         with open(val_spec, "w") as out:
             out.write(f"""SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
 copyrights:
@@ -514,6 +516,7 @@ test-description: {_block(test.desc)}
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: {test_suite_name}
 test-target: {source}
 type: test-suite
 """)
diff --git a/spec/dev/clock/val/mem-driver.yml b/spec/dev/clock/val/mem-driver.yml
index a125d1a..da09fc0 100644
--- a/spec/dev/clock/val/mem-driver.yml
+++ b/spec/dev/clock/val/mem-driver.yml
@@ -49,5 +49,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemDriver
 test-target: testsuites/membench/mem-clock-driver.c
 type: test-suite
diff --git a/spec/rtems/barrier/val/mem-wait-rel-del.yml b/spec/rtems/barrier/val/mem-wait-rel-del.yml
index 9adcc49..b93cf01 100644
--- a/spec/rtems/barrier/val/mem-wait-rel-del.yml
+++ b/spec/rtems/barrier/val/mem-wait-rel-del.yml
@@ -55,5 +55,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemWaitRelDel
 test-target: testsuites/membench/mem-barrier-wait-rel-del.c
 type: test-suite
diff --git a/spec/rtems/barrier/val/mem-wait-rel.yml b/spec/rtems/barrier/val/mem-wait-rel.yml
index f7c54c1..97e8685 100644
--- a/spec/rtems/barrier/val/mem-wait-rel.yml
+++ b/spec/rtems/barrier/val/mem-wait-rel.yml
@@ -53,5 +53,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemWaitRel
 test-target: testsuites/membench/mem-barrier-wait-rel.c
 type: test-suite
diff --git a/spec/rtems/event/val/mem-snd-rcv.yml b/spec/rtems/event/val/mem-snd-rcv.yml
index 6769000..6b75094 100644
--- a/spec/rtems/event/val/mem-snd-rcv.yml
+++ b/spec/rtems/event/val/mem-snd-rcv.yml
@@ -49,5 +49,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemSndRcv
 test-target: testsuites/membench/mem-event-snd-rcv.c
 type: test-suite
diff --git a/spec/rtems/fatal/val/mem-fatal.yml b/spec/rtems/fatal/val/mem-fatal.yml
index 44be873..5f6132a 100644
--- a/spec/rtems/fatal/val/mem-fatal.yml
+++ b/spec/rtems/fatal/val/mem-fatal.yml
@@ -48,5 +48,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemFatal
 test-target: testsuites/membench/mem-fatal-fatal.c
 type: test-suite
diff --git a/spec/rtems/part/val/mem-get-ret-del.yml b/spec/rtems/part/val/mem-get-ret-del.yml
index 0de1790..9fe0f63 100644
--- a/spec/rtems/part/val/mem-get-ret-del.yml
+++ b/spec/rtems/part/val/mem-get-ret-del.yml
@@ -55,5 +55,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemGetRetDel
 test-target: testsuites/membench/mem-part-get-ret-del.c
 type: test-suite
diff --git a/spec/rtems/part/val/mem-get-ret.yml b/spec/rtems/part/val/mem-get-ret.yml
index d10bbdf..9a97c3a 100644
--- a/spec/rtems/part/val/mem-get-ret.yml
+++ b/spec/rtems/part/val/mem-get-ret.yml
@@ -54,5 +54,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemGetRet
 test-target: testsuites/membench/mem-part-get-ret.c
 type: test-suite
diff --git a/spec/rtems/ratemon/val/mem-period-del.yml b/spec/rtems/ratemon/val/mem-period-del.yml
index 18348cd..35f642b 100644
--- a/spec/rtems/ratemon/val/mem-period-del.yml
+++ b/spec/rtems/ratemon/val/mem-period-del.yml
@@ -53,5 +53,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemPeriodDel
 test-target: testsuites/membench/mem-ratemon-period-del.c
 type: test-suite
diff --git a/spec/rtems/ratemon/val/mem-period.yml b/spec/rtems/ratemon/val/mem-period.yml
index 0e960f6..5cef994 100644
--- a/spec/rtems/ratemon/val/mem-period.yml
+++ b/spec/rtems/ratemon/val/mem-period.yml
@@ -52,5 +52,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemPeriod
 test-target: testsuites/membench/mem-ratemon-period.c
 type: test-suite
diff --git a/spec/rtems/sem/val/mem-obt-rel-del.yml b/spec/rtems/sem/val/mem-obt-rel-del.yml
index 3efc7db..b022af6 100644
--- a/spec/rtems/sem/val/mem-obt-rel-del.yml
+++ b/spec/rtems/sem/val/mem-obt-rel-del.yml
@@ -55,5 +55,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemObtRelDel
 test-target: testsuites/membench/mem-sem-obt-rel-del.c
 type: test-suite
diff --git a/spec/rtems/sem/val/mem-obt-rel.yml b/spec/rtems/sem/val/mem-obt-rel.yml
index 96ec473..ece67c4 100644
--- a/spec/rtems/sem/val/mem-obt-rel.yml
+++ b/spec/rtems/sem/val/mem-obt-rel.yml
@@ -53,5 +53,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemObtRel
 test-target: testsuites/membench/mem-sem-obt-rel.c
 type: test-suite
diff --git a/spec/rtems/signal/val/mem-catch-snd.yml b/spec/rtems/signal/val/mem-catch-snd.yml
index de3beaa..71469e7 100644
--- a/spec/rtems/signal/val/mem-catch-snd.yml
+++ b/spec/rtems/signal/val/mem-catch-snd.yml
@@ -49,5 +49,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemCatchSnd
 test-target: testsuites/membench/mem-signal-catch-snd.c
 type: test-suite
diff --git a/spec/rtems/task/val/mem-del.yml b/spec/rtems/task/val/mem-del.yml
index b41a7f2..bea76be 100644
--- a/spec/rtems/task/val/mem-del.yml
+++ b/spec/rtems/task/val/mem-del.yml
@@ -49,5 +49,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemDel
 test-target: testsuites/membench/mem-task-del.c
 type: test-suite
diff --git a/spec/rtems/task/val/mem-exit.yml b/spec/rtems/task/val/mem-exit.yml
index b325e78..061e9e1 100644
--- a/spec/rtems/task/val/mem-exit.yml
+++ b/spec/rtems/task/val/mem-exit.yml
@@ -49,5 +49,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemExit
 test-target: testsuites/membench/mem-task-exit.c
 type: test-suite
diff --git a/spec/rtems/task/val/mem-restart.yml b/spec/rtems/task/val/mem-restart.yml
index bc5caf5..403c950 100644
--- a/spec/rtems/task/val/mem-restart.yml
+++ b/spec/rtems/task/val/mem-restart.yml
@@ -49,5 +49,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemRestart
 test-target: testsuites/membench/mem-task-restart.c
 type: test-suite
diff --git a/spec/rtems/task/val/mem-sus-res.yml b/spec/rtems/task/val/mem-sus-res.yml
index 1e6803f..c60a697 100644
--- a/spec/rtems/task/val/mem-sus-res.yml
+++ b/spec/rtems/task/val/mem-sus-res.yml
@@ -50,5 +50,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemSusRes
 test-target: testsuites/membench/mem-task-sus-res.c
 type: test-suite
diff --git a/spec/rtems/val/mem-basic.yml b/spec/rtems/val/mem-basic.yml
index e7d1605..f532d11 100644
--- a/spec/rtems/val/mem-basic.yml
+++ b/spec/rtems/val/mem-basic.yml
@@ -50,5 +50,6 @@ test-description: |
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemBasic
 test-target: testsuites/membench/mem-rtems-basic.c
 type: test-suite
diff --git a/spec/rtems/val/mem-smp-1.yml b/spec/rtems/val/mem-smp-1.yml
index e8543a4..23ebba3 100644
--- a/spec/rtems/val/mem-smp-1.yml
+++ b/spec/rtems/val/mem-smp-1.yml
@@ -55,5 +55,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemSmp1
 test-target: testsuites/membench/mem-rtems-smp-1.c
 type: test-suite
diff --git a/spec/rtems/val/mem-smp-global-2.yml b/spec/rtems/val/mem-smp-global-2.yml
index 82da7d1..f55bf3a 100644
--- a/spec/rtems/val/mem-smp-global-2.yml
+++ b/spec/rtems/val/mem-smp-global-2.yml
@@ -55,5 +55,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemSmpGlobal2
 test-target: testsuites/membench/mem-rtems-smp-global-2.c
 type: test-suite
diff --git a/spec/rtems/val/mem-smp-global-4.yml b/spec/rtems/val/mem-smp-global-4.yml
index 6503768..42c32f8 100644
--- a/spec/rtems/val/mem-smp-global-4.yml
+++ b/spec/rtems/val/mem-smp-global-4.yml
@@ -55,5 +55,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemSmpGlobal4
 test-target: testsuites/membench/mem-rtems-smp-global-4.c
 type: test-suite
diff --git a/spec/rtems/val/mem-smp-part-2.yml b/spec/rtems/val/mem-smp-part-2.yml
index 4be00a3..44eb107 100644
--- a/spec/rtems/val/mem-smp-part-2.yml
+++ b/spec/rtems/val/mem-smp-part-2.yml
@@ -72,5 +72,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemSmpPart2
 test-target: testsuites/membench/mem-rtems-smp-part-2.c
 type: test-suite
diff --git a/spec/rtems/val/mem-smp-part-4.yml b/spec/rtems/val/mem-smp-part-4.yml
index f6653d0..57fe839 100644
--- a/spec/rtems/val/mem-smp-part-4.yml
+++ b/spec/rtems/val/mem-smp-part-4.yml
@@ -80,5 +80,6 @@ test-description: null
 test-includes:
 - rtems.h
 test-local-includes: []
+test-suite-name: MemSmpPart4
 test-target: testsuites/membench/mem-rtems-smp-part-4.c
 type: test-suite
diff --git a/spec/spec/test-suite.yml b/spec/spec/test-suite.yml
index e8d7aaa..e837cd0 100644
--- a/spec/spec/test-suite.yml
+++ b/spec/spec/test-suite.yml
@@ -35,6 +35,10 @@ spec-info:
         description: |
           It shall be a list of header files included via ``#include "..."``.
         spec-type: list-str
+      test-suite-name:
+        description: |
+          It shall be the name of the test suite.
+        spec-type: str
       test-target:
         description: |
           It shall be the path to the generated target test suite source file.
diff --git a/spec/testsuites/model-0.yml b/spec/testsuites/model-0.yml
index 862f367..15eabb5 100644
--- a/spec/testsuites/model-0.yml
+++ b/spec/testsuites/model-0.yml
@@ -8,7 +8,7 @@ test-brief: |
   for all specified managers and functions.  It is intended for model based
   testing.
 test-code: |
-  const char rtems_test_name[] = "Model0";
+  const char rtems_test_name[] = "${.:/test-suite-name}";
 
   #define CONFIGURE_MAXIMUM_PROCESSORS 4
 
@@ -18,5 +18,6 @@ test-description: |
   scheduler are provided using up to four processors.
 test-includes: []
 test-local-includes: []
+test-suite-name: Model0
 test-target: testsuites/validation/ts-model-0.c
 type: test-suite
diff --git a/spec/testsuites/performance-0.yml b/spec/testsuites/performance-0.yml
index b9784e6..1a6db0d 100644
--- a/spec/testsuites/performance-0.yml
+++ b/spec/testsuites/performance-0.yml
@@ -7,7 +7,7 @@ test-brief: |
   This general purpose performance test suite provides enough resources to run
   basic performance tests for all specified managers and functions.
 test-code: |
-  const char rtems_test_name[] = "Performance0";
+  const char rtems_test_name[] = "${.:/test-suite-name}";
 
   #include "ts-default.h"
 test-description: |
@@ -16,5 +16,6 @@ test-description: |
 test-includes:
 - rtems/test-info.h
 test-local-includes: []
+test-suite-name: Performance0
 test-target: testsuites/validation/ts-performance-0.c
 type: test-suite
diff --git a/spec/testsuites/validation-0.yml b/spec/testsuites/validation-0.yml
index 8ecb6bc..4b6d544 100644
--- a/spec/testsuites/validation-0.yml
+++ b/spec/testsuites/validation-0.yml
@@ -7,7 +7,7 @@ test-brief: |
   This general purpose validation test suite provides enough resources to run
   basic tests for all specified managers and functions.
 test-code: |
-  const char rtems_test_name[] = "Validation0";
+  const char rtems_test_name[] = "${.:/test-suite-name}";
 
   #define CONFIGURE_MAXIMUM_PROCESSORS 4
 
@@ -17,5 +17,6 @@ test-description: |
   scheduler are provided using up to four processors.
 test-includes: []
 test-local-includes: []
+test-suite-name: Validation0
 test-target: testsuites/validation/ts-validation-0.c
 type: test-suite
diff --git a/spec/testsuites/validation-1.yml b/spec/testsuites/validation-1.yml
index 0f0a8de..ac9e367 100644
--- a/spec/testsuites/validation-1.yml
+++ b/spec/testsuites/validation-1.yml
@@ -8,7 +8,7 @@ test-brief: |
   basic tests for all specified managers and functions in a configuration with
   exactly one processor.
 test-code: |
-  const char rtems_test_name[] = "Validation1";
+  const char rtems_test_name[] = "${.:/test-suite-name}";
 
   #define CONFIGURE_MAXIMUM_PROCESSORS 1
 
@@ -16,5 +16,6 @@ test-code: |
 test-description: null
 test-includes: []
 test-local-includes: []
+test-suite-name: Validation1
 test-target: testsuites/validation/ts-validation-1.c
 type: test-suite
diff --git a/spec/testsuites/validation-2.yml b/spec/testsuites/validation-2.yml
index 3929608..41cc39c 100644
--- a/spec/testsuites/validation-2.yml
+++ b/spec/testsuites/validation-2.yml
@@ -8,7 +8,7 @@ test-brief: |
   basic tests without a ${/glossary/clock-driver:/term} for all specified
   managers and functions.
 test-code: |
-  const char rtems_test_name[] = "Validation2";
+  const char rtems_test_name[] = "${.:/test-suite-name}";
 
   #define CONFIGURE_MAXIMUM_PROCESSORS 4
 
@@ -20,5 +20,6 @@ test-description: |
   scheduler are provided using up to four processors.
 test-includes: []
 test-local-includes: []
+test-suite-name: Validation2
 test-target: testsuites/validation/ts-validation-2.c
 type: test-suite
diff --git a/spec/testsuites/validation/profile.yml b/spec/testsuites/validation/profile.yml
index ca34f5b..39379b6 100644
--- a/spec/testsuites/validation/profile.yml
+++ b/spec/testsuites/validation/profile.yml
@@ -69,7 +69,7 @@ test-code: |
   };
 
   static const T_config test_config = {
-    .name = "SpaceProfile",
+    .name = "${.:/test-suite-name}",
     .buf = buffer,
     .buf_size = sizeof(buffer),
     .putchar = rtems_put_char,
@@ -164,5 +164,6 @@ test-includes:
 - rtems/sysinit.h
 - rtems/score/sysstate.h
 test-local-includes: []
+test-suite-name: SpaceProfile
 test-target: testsuites/validation/ts-space-profile.c
 type: test-suite



More information about the vc mailing list