[rtems-central commit] validation: Remove prologue/epilogue in test cases

Sebastian Huber sebh at rtems.org
Thu Feb 4 13:26:58 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb  4 10:07:43 2021 +0100

validation: Remove prologue/epilogue in test cases

---

 rtemsspec/tests/spec-validation/tc.yml         |  4 ----
 rtemsspec/tests/spec-validation/tc2.yml        |  2 --
 rtemsspec/tests/spec-validation/tc3.yml        |  2 --
 rtemsspec/tests/spec-validation/tc4.yml        |  3 ---
 rtemsspec/tests/spec-validation/tc5.yml        |  3 ---
 rtemsspec/tests/spec-validation/tc6.yml        |  2 --
 rtemsspec/tests/test_validation.py             |  7 -------
 rtemsspec/validation.py                        |  2 --
 spec/rtems/attr/val/attr.yml                   |  2 --
 spec/rtems/barrier/val/ident.yml               |  2 --
 spec/rtems/basedefs/val/basedefs.yml           |  2 --
 spec/rtems/event/val/event-constant.yml        |  2 --
 spec/rtems/event/val/events.yml                |  2 --
 spec/rtems/event/val/send-receive.yml          |  2 --
 spec/rtems/event/val/system-send-receive.yml   |  2 --
 spec/rtems/message/val/ident.yml               |  2 --
 spec/rtems/mode/val/modes.yml                  |  2 --
 spec/rtems/option/val/options.yml              |  2 --
 spec/rtems/part/val/ident.yml                  |  2 --
 spec/rtems/part/val/part.yml                   |  2 --
 spec/rtems/ratemon/val/ident.yml               |  2 --
 spec/rtems/sem/val/ident.yml                   |  2 --
 spec/rtems/timer/val/ident.yml                 |  2 --
 spec/rtems/userext/val/ident.yml               |  2 --
 spec/spec/test-case.yml                        | 13 -------------
 spec/testsuites/validation/c-library.yml       |  2 --
 spec/testsuites/validation/classic-barrier.yml |  2 --
 27 files changed, 74 deletions(-)

diff --git a/rtemsspec/tests/spec-validation/tc.yml b/rtemsspec/tests/spec-validation/tc.yml
index 6b5b821..782ea76 100644
--- a/rtemsspec/tests/spec-validation/tc.yml
+++ b/rtemsspec/tests/spec-validation/tc.yml
@@ -40,15 +40,11 @@ test-brief: Test case brief description.
 test-context: []
 test-context-support: null
 test-description: Test case description.
-test-epilogue: |
-  /* Test case epilogue code */
 test-header: null
 test-includes:
 - a.h
 test-local-includes:
 - x.h
-test-prologue: |
-  /* Test case prologue code */
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/rtemsspec/tests/spec-validation/tc2.yml b/rtemsspec/tests/spec-validation/tc2.yml
index 89f2376..fc38919 100644
--- a/rtemsspec/tests/spec-validation/tc2.yml
+++ b/rtemsspec/tests/spec-validation/tc2.yml
@@ -36,13 +36,11 @@ test-context:
     int member
 test-context-support: null
 test-description: Test case 2 description.
-test-epilogue: null
 test-header: null
 test-includes:
 - b.h
 test-local-includes:
 - y.h
-test-prologue: null
 test-setup:
   brief: |
     Setup brief.
diff --git a/rtemsspec/tests/spec-validation/tc3.yml b/rtemsspec/tests/spec-validation/tc3.yml
index e91b067..f8293a6 100644
--- a/rtemsspec/tests/spec-validation/tc3.yml
+++ b/rtemsspec/tests/spec-validation/tc3.yml
@@ -19,13 +19,11 @@ test-brief: Test case 3 brief description.
 test-context: []
 test-context-support: null
 test-description: Test case 3 description.
-test-epilogue: null
 test-header: null
 test-includes:
 - c.h
 test-local-includes:
 - z.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: null
diff --git a/rtemsspec/tests/spec-validation/tc4.yml b/rtemsspec/tests/spec-validation/tc4.yml
index 28ddd64..c9f3c98 100644
--- a/rtemsspec/tests/spec-validation/tc4.yml
+++ b/rtemsspec/tests/spec-validation/tc4.yml
@@ -8,12 +8,9 @@ test-brief: Test case 4 brief description.
 test-context: []
 test-context-support: null
 test-description: Test case 4 description.
-test-epilogue: |
-  /* Test case 4 epilogue code */
 test-header: null
 test-includes: []
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: null
diff --git a/rtemsspec/tests/spec-validation/tc5.yml b/rtemsspec/tests/spec-validation/tc5.yml
index cdb98d9..00866c9 100644
--- a/rtemsspec/tests/spec-validation/tc5.yml
+++ b/rtemsspec/tests/spec-validation/tc5.yml
@@ -40,8 +40,6 @@ test-brief: Test case 5 brief description.
 test-context: []
 test-context-support: null
 test-description: Test case 5 description.
-test-epilogue: |
-  /* Test case 5 epilogue code */
 test-header:
   code: |
     /* Header code for ${.:/test-run}() */
@@ -68,7 +66,6 @@ test-header:
   target: tc5.h
 test-includes: []
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: null
diff --git a/rtemsspec/tests/spec-validation/tc6.yml b/rtemsspec/tests/spec-validation/tc6.yml
index 19a0339..bf1c60d 100644
--- a/rtemsspec/tests/spec-validation/tc6.yml
+++ b/rtemsspec/tests/spec-validation/tc6.yml
@@ -8,7 +8,6 @@ test-brief: null
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header:
   code: null
   includes: []
@@ -17,7 +16,6 @@ test-header:
   target: tc6.h
 test-includes: []
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: null
diff --git a/rtemsspec/tests/test_validation.py b/rtemsspec/tests/test_validation.py
index 78bbcf7..93242cb 100644
--- a/rtemsspec/tests/test_validation.py
+++ b/rtemsspec/tests/test_validation.py
@@ -863,8 +863,6 @@ T_TEST_CASE_FIXTURE( Directive, &Directive_Fixture )
  */
 T_TEST_CASE( Tc )
 {
-  /* Test case prologue code */
-
   T_plan( 125 );
 
   /* Test case action 0 code */
@@ -874,8 +872,6 @@ T_TEST_CASE( Tc )
   /* Test case action 1 code */
   /* Test case action 1 check 0 code; step 124 */
   /* Test case action 1 check 1 code */
-
-  /* Test case epilogue code */
 }
 
 /** @} */
@@ -1266,7 +1262,6 @@ T_TEST_CASE( Tc3 )
  */
 T_TEST_CASE( Tc4 )
 {
-  /* Test case 4 epilogue code */
 }
 
 /** @} */
@@ -1308,8 +1303,6 @@ static void Tc5_Wrap( int *a, int b, int *c )
   /* Test case action 1 code */
   /* Test case action 1 check 0 code; step 1 */
   /* Test case action 1 check 1 code */
-
-  /* Test case 5 epilogue code */
 }
 
 static T_fixture_node Tc5_Node;
diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py
index 648e787..33724c2 100644
--- a/rtemsspec/validation.py
+++ b/rtemsspec/validation.py
@@ -386,11 +386,9 @@ class _TestItem:
                 pass
             content.gap = False
         with content.function(ret, name, params, align=align):
-            content.add(self.substitute_code(self["test-prologue"]))
             if self._mapper.steps > 0:
                 content.add(f"T_plan( {self._mapper.steps} );")
             content.add(actions)
-            content.add(self.substitute_code(self["test-epilogue"]))
         if header and fixture:
             run = f"{self.ident}_Run"
             content.add(f"static T_fixture_node {self.ident}_Node;")
diff --git a/spec/rtems/attr/val/attr.yml b/spec/rtems/attr/val/attr.yml
index d5601b9..3acd56e 100644
--- a/spec/rtems/attr/val/attr.yml
+++ b/spec/rtems/attr/val/attr.yml
@@ -251,12 +251,10 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems.h
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/barrier/val/ident.yml b/spec/rtems/barrier/val/ident.yml
index 69cf096..9b3f7e9 100644
--- a/spec/rtems/barrier/val/ident.yml
+++ b/spec/rtems/barrier/val/ident.yml
@@ -34,12 +34,10 @@ test-brief: Test the ${../if/ident:/name} directive.
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes: []
 test-local-includes:
 - tr-object-ident-local.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/basedefs/val/basedefs.yml b/spec/rtems/basedefs/val/basedefs.yml
index db1f8b9..e0844a4 100644
--- a/spec/rtems/basedefs/val/basedefs.yml
+++ b/spec/rtems/basedefs/val/basedefs.yml
@@ -1324,7 +1324,6 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - stddef.h
@@ -1332,7 +1331,6 @@ test-includes:
 - rtems.h
 test-local-includes:
 - tc-basedefs-pendant.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/event/val/event-constant.yml b/spec/rtems/event/val/event-constant.yml
index d06e698..c181731 100644
--- a/spec/rtems/event/val/event-constant.yml
+++ b/spec/rtems/event/val/event-constant.yml
@@ -365,7 +365,6 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header:
   code: null
   includes:
@@ -387,7 +386,6 @@ test-includes:
 - rtems.h
 test-local-includes:
 - tr-event-constant.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: null
diff --git a/spec/rtems/event/val/events.yml b/spec/rtems/event/val/events.yml
index 063b24e..9ab5ed9 100644
--- a/spec/rtems/event/val/events.yml
+++ b/spec/rtems/event/val/events.yml
@@ -52,13 +52,11 @@ test-brief: Tests the Event Manager API.
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems.h
 test-local-includes:
 - tr-event-constant.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/event/val/send-receive.yml b/spec/rtems/event/val/send-receive.yml
index ac09b01..ec12f2f 100644
--- a/spec/rtems/event/val/send-receive.yml
+++ b/spec/rtems/event/val/send-receive.yml
@@ -26,7 +26,6 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems/rtems/eventimpl.h
@@ -35,7 +34,6 @@ test-includes:
 - rtems/score/threadimpl.h
 test-local-includes:
 - tr-event-send-receive.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/event/val/system-send-receive.yml b/spec/rtems/event/val/system-send-receive.yml
index 8e17d48..bda6cd3 100644
--- a/spec/rtems/event/val/system-send-receive.yml
+++ b/spec/rtems/event/val/system-send-receive.yml
@@ -27,7 +27,6 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems/rtems/eventimpl.h
@@ -36,7 +35,6 @@ test-includes:
 - rtems/score/threadimpl.h
 test-local-includes:
 - tr-event-send-receive.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/message/val/ident.yml b/spec/rtems/message/val/ident.yml
index e3e9d9c..83b04f8 100644
--- a/spec/rtems/message/val/ident.yml
+++ b/spec/rtems/message/val/ident.yml
@@ -32,12 +32,10 @@ test-brief: Test the ${../if/ident:/name} directive.
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes: []
 test-local-includes:
 - tr-object-ident.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/mode/val/modes.yml b/spec/rtems/mode/val/modes.yml
index 4f42cc6..2462948 100644
--- a/spec/rtems/mode/val/modes.yml
+++ b/spec/rtems/mode/val/modes.yml
@@ -215,12 +215,10 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems.h
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/option/val/options.yml b/spec/rtems/option/val/options.yml
index 5e2e1c5..82acee9 100644
--- a/spec/rtems/option/val/options.yml
+++ b/spec/rtems/option/val/options.yml
@@ -90,12 +90,10 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems.h
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/part/val/ident.yml b/spec/rtems/part/val/ident.yml
index 0ab8344..f80c96e 100644
--- a/spec/rtems/part/val/ident.yml
+++ b/spec/rtems/part/val/ident.yml
@@ -37,12 +37,10 @@ test-brief: Test the ${../if/ident:/name} directive.
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes: []
 test-local-includes:
 - tr-object-ident.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/part/val/part.yml b/spec/rtems/part/val/part.yml
index f2514d2..413304a 100644
--- a/spec/rtems/part/val/part.yml
+++ b/spec/rtems/part/val/part.yml
@@ -100,12 +100,10 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems.h
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: null
diff --git a/spec/rtems/ratemon/val/ident.yml b/spec/rtems/ratemon/val/ident.yml
index 2a6f49e..591da70 100644
--- a/spec/rtems/ratemon/val/ident.yml
+++ b/spec/rtems/ratemon/val/ident.yml
@@ -32,12 +32,10 @@ test-brief: Test the ${../if/ident:/name} directive.
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes: []
 test-local-includes:
 - tr-object-ident-local.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/sem/val/ident.yml b/spec/rtems/sem/val/ident.yml
index 7b03f3d..5da9bd2 100644
--- a/spec/rtems/sem/val/ident.yml
+++ b/spec/rtems/sem/val/ident.yml
@@ -35,12 +35,10 @@ test-brief: Test the ${../if/ident:/name} directive.
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes: []
 test-local-includes:
 - tr-object-ident.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/timer/val/ident.yml b/spec/rtems/timer/val/ident.yml
index d69ca34..6d756a7 100644
--- a/spec/rtems/timer/val/ident.yml
+++ b/spec/rtems/timer/val/ident.yml
@@ -32,12 +32,10 @@ test-brief: Test the ${../if/ident:/name} directive.
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes: []
 test-local-includes:
 - tr-object-ident-local.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/rtems/userext/val/ident.yml b/spec/rtems/userext/val/ident.yml
index 99ac879..b07286d 100644
--- a/spec/rtems/userext/val/ident.yml
+++ b/spec/rtems/userext/val/ident.yml
@@ -34,12 +34,10 @@ test-brief: Test the ${../if/ident:/name} directive.
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes: []
 test-local-includes:
 - tr-object-ident-local.h
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |
diff --git a/spec/spec/test-case.yml b/spec/spec/test-case.yml
index 0a03d25..86d6a5c 100644
--- a/spec/spec/test-case.yml
+++ b/spec/spec/test-case.yml
@@ -34,12 +34,6 @@ spec-info:
         description: |
           It shall be the test case description.
         spec-type: optional-str
-      test-epilogue:
-        description: |
-          If the value is present, then it shall be the test case epilogue
-          code.  The epilogue code is placed in the test case body after the
-          test case actions.
-        spec-type: optional-str
       test-header:
         description: null
         spec-type: test-header
@@ -51,13 +45,6 @@ spec-info:
         description: |
           It shall be a list of header files included via ``#include "..."``.
         spec-type: list-str
-      test-prologue:
-        description: |
-          If the value is present, then it shall be the test case prologue
-          code.  The prologue code is placed in the test case body before the
-          test case actions.  A use case is the declaration of local variables
-          used by the test case actions.
-        spec-type: optional-str
       test-setup:
         description: null
         spec-type: test-support-method
diff --git a/spec/testsuites/validation/c-library.yml b/spec/testsuites/validation/c-library.yml
index 5a0d41c..bf4ae4a 100644
--- a/spec/testsuites/validation/c-library.yml
+++ b/spec/testsuites/validation/c-library.yml
@@ -67,14 +67,12 @@ test-brief: |
 test-context: []
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems.h
 - stdlib.h
 - rtems/malloc.h
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: null
diff --git a/spec/testsuites/validation/classic-barrier.yml b/spec/testsuites/validation/classic-barrier.yml
index e4fb939..dc76338 100644
--- a/spec/testsuites/validation/classic-barrier.yml
+++ b/spec/testsuites/validation/classic-barrier.yml
@@ -85,12 +85,10 @@ test-context:
     rtems_id id
 test-context-support: null
 test-description: null
-test-epilogue: null
 test-header: null
 test-includes:
 - rtems.h
 test-local-includes: []
-test-prologue: null
 test-setup: null
 test-stop: null
 test-support: |



More information about the vc mailing list