[rtems-central commit] validation: Add check brief descriptions

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


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb  4 14:17:03 2021 +0100

validation: Add check brief descriptions

---

 rtemsspec/tests/test_validation.py | 44 ++++++++++++++++++++++++++++++++++++++
 rtemsspec/validation.py            |  2 ++
 2 files changed, 46 insertions(+)

diff --git a/rtemsspec/tests/test_validation.py b/rtemsspec/tests/test_validation.py
index 9ddc90e..001f8ab 100644
--- a/rtemsspec/tests/test_validation.py
+++ b/rtemsspec/tests/test_validation.py
@@ -864,7 +864,15 @@ T_TEST_CASE_FIXTURE( Directive, &Directive_Fixture )
 static void Tc_Action_0( void )
 {
   /* Test case action 0 code */
+
+  /*
+   * Test case action 0 check 0 description.
+   */
   /* Test case action 0 check 0 code: Accounts for 123 test plan steps */
+
+  /*
+   * Test case action 0 check 1 description.
+   */
   /* Test case action 0 check 1 code; step 123 */
 }
 
@@ -874,7 +882,15 @@ static void Tc_Action_0( void )
 static void Tc_Action_1( void )
 {
   /* Test case action 1 code */
+
+  /*
+   * Test case action 1 check 0 description.
+   */
   /* Test case action 1 check 0 code; step 124 */
+
+  /*
+   * Test case action 1 check 1 description.
+   */
   /* Test case action 1 check 1 code */
 }
 
@@ -960,7 +976,15 @@ static T_fixture Tc2_Fixture = {
 static void Tc2_Action_0( Tc2_Context *ctx )
 {
   /* Test case 2 action 0 code */
+
+  /*
+   * Test case 2 action 0 check 0 description.
+   */
   /* Test case 2 action 0 check 0 code */
+
+  /*
+   * Test case 2 action 0 check 1 description.
+   */
   /* Test case 2 action 0 check 1 code */
 }
 
@@ -1273,6 +1297,10 @@ T_TEST_CASE_FIXTURE( Rtm, &Rtm_Fixture )
 static void Tc3_Action_0( void )
 {
   /* Test case 3 action 0 code */
+
+  /*
+   * Test case 3 action 0 check 0 description.
+   */
   /* Test case 3 action 0 check 0 code; step 0 */
 }
 
@@ -1375,7 +1403,15 @@ static T_fixture Tc5_Fixture = {
 static void Tc5_Action_0( Tc5_Context *ctx )
 {
   /* Test case action 0 code */
+
+  /*
+   * Test case action 0 check 0 description.
+   */
   /* Test case action 0 check 0 code */
+
+  /*
+   * Test case action 0 check 1 description.
+   */
   /* Test case action 0 check 1 code; step 0 */
 }
 
@@ -1385,7 +1421,15 @@ static void Tc5_Action_0( Tc5_Context *ctx )
 static void Tc5_Action_1( Tc5_Context *ctx )
 {
   /* Test case action 1 code */
+
+  /*
+   * Test case action 1 check 0 description.
+   */
   /* Test case action 1 check 0 code; step 1 */
+
+  /*
+   * Test case action 1 check 1 description.
+   */
   /* Test case action 1 check 1 code */
 }
 
diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py
index cbf347e..1f4c9c2 100644
--- a/rtemsspec/validation.py
+++ b/rtemsspec/validation.py
@@ -207,6 +207,8 @@ class _TestItem:
             with content.function("static void", method, params):
                 content.add(self.substitute_code(action["action-code"]))
                 for check in action["checks"]:
+                    with content.comment_block():
+                        content.add(self.substitute_text(check["brief"]))
                     content.append(self.substitute_text(check["code"]))
         return actions
 



More information about the vc mailing list