[rtems-central commit] spec: Add test header to test case item type

Sebastian Huber sebh at rtems.org
Thu Aug 20 14:13:13 UTC 2020


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Aug 14 07:41:24 2020 +0200

spec: Add test header to test case item type

---

 rtemsspec/tests/spec-validation/tc.yml             |  1 +
 rtemsspec/tests/spec-validation/tc2.yml            |  1 +
 rtemsspec/tests/spec-validation/tc3.yml            |  1 +
 rtemsspec/tests/spec-validation/tc4.yml            |  1 +
 spec/req/rtems/barrier/val/ident.yml               |  1 +
 spec/req/rtems/message/val/ident.yml               |  1 +
 spec/req/rtems/part/val/ident.yml                  |  1 +
 spec/req/rtems/ratemon/val/ident.yml               |  1 +
 spec/req/rtems/sem/val/ident.yml                   |  1 +
 spec/req/rtems/timer/val/ident.yml                 |  1 +
 spec/req/rtems/userext/val/ident.yml               |  1 +
 spec/spec/requirement-action.yml                   |  2 +-
 spec/spec/test-case.yml                            |  3 +++
 ...ment-action-test-header.yml => test-header.yml} | 24 +++++++++++-----------
 ...-run-param-list.yml => test-run-param-list.yml} |  6 +++---
 ...ction-test-run-param.yml => test-run-param.yml} |  9 ++++----
 spec/testsuites/validation/c-library.yml           |  1 +
 spec/testsuites/validation/classic-barrier.yml     |  1 +
 18 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/rtemsspec/tests/spec-validation/tc.yml b/rtemsspec/tests/spec-validation/tc.yml
index 9b0af09..682ac54 100644
--- a/rtemsspec/tests/spec-validation/tc.yml
+++ b/rtemsspec/tests/spec-validation/tc.yml
@@ -50,4 +50,5 @@ prologue: |
 support: |
   /* Test case support code */
 target: tc12.c
+test-header: null
 type: test-case
diff --git a/rtemsspec/tests/spec-validation/tc2.yml b/rtemsspec/tests/spec-validation/tc2.yml
index 2af3184..90be0ee 100644
--- a/rtemsspec/tests/spec-validation/tc2.yml
+++ b/rtemsspec/tests/spec-validation/tc2.yml
@@ -37,4 +37,5 @@ local-includes:
 prologue: null
 support: null
 target: tc12.c
+test-header: null
 type: test-case
diff --git a/rtemsspec/tests/spec-validation/tc3.yml b/rtemsspec/tests/spec-validation/tc3.yml
index 8c48476..e16a932 100644
--- a/rtemsspec/tests/spec-validation/tc3.yml
+++ b/rtemsspec/tests/spec-validation/tc3.yml
@@ -26,4 +26,5 @@ local-includes:
 prologue: null
 support: null
 target: tc34.c
+test-header: null
 type: test-case
diff --git a/rtemsspec/tests/spec-validation/tc4.yml b/rtemsspec/tests/spec-validation/tc4.yml
index a1ab1bc..59ecaf8 100644
--- a/rtemsspec/tests/spec-validation/tc4.yml
+++ b/rtemsspec/tests/spec-validation/tc4.yml
@@ -14,4 +14,5 @@ local-includes: []
 prologue: null
 support: null
 target: tc34.c
+test-header: null
 type: test-case
diff --git a/spec/req/rtems/barrier/val/ident.yml b/spec/req/rtems/barrier/val/ident.yml
index 62a22eb..7fc206c 100644
--- a/spec/req/rtems/barrier/val/ident.yml
+++ b/spec/req/rtems/barrier/val/ident.yml
@@ -43,4 +43,5 @@ support: |
     return rtems_barrier_ident( name, id );
   }
 target: testsuites/validation/tc-barrier-ident.c
+test-header: null
 type: test-case
diff --git a/spec/req/rtems/message/val/ident.yml b/spec/req/rtems/message/val/ident.yml
index d6fc54a..18565e6 100644
--- a/spec/req/rtems/message/val/ident.yml
+++ b/spec/req/rtems/message/val/ident.yml
@@ -45,4 +45,5 @@ support: |
     return rtems_message_queue_ident( name, node, id );
   }
 target: testsuites/validation/tc-message-ident.c
+test-header: null
 type: test-case
diff --git a/spec/req/rtems/part/val/ident.yml b/spec/req/rtems/part/val/ident.yml
index 28c3185..8120b9f 100644
--- a/spec/req/rtems/part/val/ident.yml
+++ b/spec/req/rtems/part/val/ident.yml
@@ -47,4 +47,5 @@ support: |
     return rtems_partition_ident( name, node, id );
   }
 target: testsuites/validation/tc-part-ident.c
+test-header: null
 type: test-case
diff --git a/spec/req/rtems/ratemon/val/ident.yml b/spec/req/rtems/ratemon/val/ident.yml
index e8fa219..9279cea 100644
--- a/spec/req/rtems/ratemon/val/ident.yml
+++ b/spec/req/rtems/ratemon/val/ident.yml
@@ -41,4 +41,5 @@ support: |
     return rtems_rate_monotonic_ident( name, id );
   }
 target: testsuites/validation/tc-ratemon-ident.c
+test-header: null
 type: test-case
diff --git a/spec/req/rtems/sem/val/ident.yml b/spec/req/rtems/sem/val/ident.yml
index 7f0ded7..3d23135 100644
--- a/spec/req/rtems/sem/val/ident.yml
+++ b/spec/req/rtems/sem/val/ident.yml
@@ -45,4 +45,5 @@ support: |
     return rtems_semaphore_ident( name, node, id );
   }
 target: testsuites/validation/tc-sem-ident.c
+test-header: null
 type: test-case
diff --git a/spec/req/rtems/timer/val/ident.yml b/spec/req/rtems/timer/val/ident.yml
index 5c8264f..3d0f479 100644
--- a/spec/req/rtems/timer/val/ident.yml
+++ b/spec/req/rtems/timer/val/ident.yml
@@ -41,4 +41,5 @@ support: |
     return rtems_timer_ident( name, id );
   }
 target: testsuites/validation/tc-timer-ident.c
+test-header: null
 type: test-case
diff --git a/spec/req/rtems/userext/val/ident.yml b/spec/req/rtems/userext/val/ident.yml
index c125ab2..6308714 100644
--- a/spec/req/rtems/userext/val/ident.yml
+++ b/spec/req/rtems/userext/val/ident.yml
@@ -43,4 +43,5 @@ support: |
     return rtems_extension_ident( name, id );
   }
 target: testsuites/validation/tc-userext-ident.c
+test-header: null
 type: test-case
diff --git a/spec/spec/requirement-action.yml b/spec/spec/requirement-action.yml
index 1940ad5..e588a73 100644
--- a/spec/spec/requirement-action.yml
+++ b/spec/spec/requirement-action.yml
@@ -173,7 +173,7 @@ spec-info:
         spec-type: optional-str
       test-header:
         description: null
-        spec-type: requirement-action-test-header
+        spec-type: test-header
       test-includes:
         description: |
           It shall be a list of header files included via ``#include <...>``.
diff --git a/spec/spec/test-case.yml b/spec/spec/test-case.yml
index 0326091..b8862ae 100644
--- a/spec/spec/test-case.yml
+++ b/spec/spec/test-case.yml
@@ -37,6 +37,9 @@ spec-info:
           fixture.  The test case fixture pointer declaration may be provided
           by the test case support code or via an included header file.
         spec-type: optional-str
+      test-header:
+        description: null
+        spec-type: test-header
       includes:
         description: |
           It shall be a list of header files included via ``#include <...>``.
diff --git a/spec/spec/requirement-action-test-header.yml b/spec/spec/test-header.yml
similarity index 55%
rename from spec/spec/requirement-action-test-header.yml
rename to spec/spec/test-header.yml
index 2836e8d..a15fc5d 100644
--- a/spec/spec/requirement-action-test-header.yml
+++ b/spec/spec/test-header.yml
@@ -12,8 +12,8 @@ spec-info:
     attributes:
       code:
         description: |
-          If the value is present, then it shall be the test case header code.
-          The header code is placed at file scope after the test enum
+          If the value is present, then it shall be the test header code.  The
+          header code is placed at file scope after the general test
           declarations and before the test run function declaration.
         spec-type: optional-str
       includes:
@@ -28,21 +28,21 @@ spec-info:
         spec-type: list-str
       run-params:
         description: null
-        spec-type: requirement-action-test-run-param-list
+        spec-type: test-run-param-list
       target:
         description: |
           It shall be the path to the generated test header file.
         spec-type: str
     description: |
-      This set of attributes specifies an action requirement test header.  In
-      case a test header is specified, then instead of a test case a test run
-      function will be generated.  The test run function will be declared in
-      the test header target file and defined in the test source target file.
-      The test run function can be used to compose test cases.  The test header
-      file is not automatically included in the test source file.  It should be
-      added to the includes or local includes of the test.
+      This set of attributes specifies a test header.  In case a test header is
+      specified, then instead of a test case a test run function will be
+      generated.  The test run function will be declared in the test header
+      target file and defined in the test source target file.  The test run
+      function can be used to compose test cases.  The test header file is not
+      automatically included in the test source file.  It should be added to
+      the includes or local includes of the test.
     mandatory-attributes: all
   none: null
-spec-name: Action Requirement Test Header
-spec-type: requirement-action-test-header
+spec-name: Test Header
+spec-type: test-header
 type: spec
diff --git a/spec/spec/requirement-action-test-run-param-list.yml b/spec/spec/test-run-param-list.yml
similarity index 65%
rename from spec/spec/requirement-action-test-run-param-list.yml
rename to spec/spec/test-run-param-list.yml
index 0cf965d..af481ac 100644
--- a/spec/spec/requirement-action-test-run-param-list.yml
+++ b/spec/spec/test-run-param-list.yml
@@ -10,7 +10,7 @@ spec-example: null
 spec-info:
   list:
     description: null
-    spec-type: requirement-action-test-run-param
-spec-name: Action Requirement Test Run Parameter List
-spec-type: requirement-action-test-run-param-list
+    spec-type: test-run-param
+spec-name: Test Run Parameter List
+spec-type: test-run-param-list
 type: spec
diff --git a/spec/spec/requirement-action-test-run-param.yml b/spec/spec/test-run-param.yml
similarity index 77%
rename from spec/spec/requirement-action-test-run-param.yml
rename to spec/spec/test-run-param.yml
index 8d23c11..77c0d3c 100644
--- a/spec/spec/requirement-action-test-run-param.yml
+++ b/spec/spec/test-run-param.yml
@@ -29,9 +29,10 @@ spec-info:
         spec-type: str
     description: |
       This set of attributes specifies a parameter for the test run function.
-      The parameter is also added as a member to the test context, see
-      ${requirement-action-test-context:/spec-name}.
+      In case this parameter is used in an ${requirement-action:/spec-name}
+      item, then the parameter is also added as a member to the test context,
+      see ${requirement-action-test-context:/spec-name}.
     mandatory-attributes: all
-spec-name: Action Requirement Test Run Parameter
-spec-type: requirement-action-test-run-param
+spec-name: Test Run Parameter
+spec-type: test-run-param
 type: spec
diff --git a/spec/testsuites/validation/c-library.yml b/spec/testsuites/validation/c-library.yml
index 2431221..dda4d36 100644
--- a/spec/testsuites/validation/c-library.yml
+++ b/spec/testsuites/validation/c-library.yml
@@ -74,4 +74,5 @@ prologue: |
   int d;
 support: null
 target: testsuites/validation/tc-space-profile.c
+test-header: null
 type: test-case
diff --git a/spec/testsuites/validation/classic-barrier.yml b/spec/testsuites/validation/classic-barrier.yml
index f4e5e44..d72b49a 100644
--- a/spec/testsuites/validation/classic-barrier.yml
+++ b/spec/testsuites/validation/classic-barrier.yml
@@ -82,4 +82,5 @@ prologue: |
   uint32_t released;
 support: null
 target: testsuites/validation/tc-space-profile.c
+test-header: null
 type: test-case



More information about the vc mailing list