summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-04 14:17:03 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-04 14:23:44 +0100
commite39087c92fe4d747e8ad71d30b31d216de72b6ba (patch)
tree711d999f9f84d73c098a8363b0d21b64390f0f11
parentvalidation: Add action brief descriptions (diff)
downloadrtems-central-e39087c92fe4d747e8ad71d30b31d216de72b6ba.tar.bz2
validation: Add check brief descriptions
-rw-r--r--rtemsspec/tests/test_validation.py44
-rw-r--r--rtemsspec/validation.py2
2 files changed, 46 insertions, 0 deletions
diff --git a/rtemsspec/tests/test_validation.py b/rtemsspec/tests/test_validation.py
index 9ddc90e8..001f8ab9 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 cbf347e8..1f4c9c21 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