[rtems-central commit] validation: Wrap comment blocks

Sebastian Huber sebh at rtems.org
Tue Mar 2 07:03:33 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Mar  2 08:02:52 2021 +0100

validation: Wrap comment blocks

---

 rtemsspec/tests/test_validation.py | 31 ++++++++++++++++---------------
 rtemsspec/validation.py            |  4 ++--
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/rtemsspec/tests/test_validation.py b/rtemsspec/tests/test_validation.py
index bac281d..8b75fe2 100644
--- a/rtemsspec/tests/test_validation.py
+++ b/rtemsspec/tests/test_validation.py
@@ -496,8 +496,8 @@ static void Directive_Post_Id_Check(
   switch ( state ) {
     case Directive_Post_Id_Nop: {
       /*
-       * The value of the object identifier referenced by the id parameter shall
-       * be the value before the call to rtems_task_ident().
+       * The value of the object identifier referenced by the id parameter
+       * shall be the value before the call to rtems_task_ident().
        */
       T_eq_ptr(ctx->id, &ctx->id_value);
       T_eq_u32(ctx->id_value, 0xffffffff);
@@ -514,8 +514,8 @@ static void Directive_Post_Id_Check(
 
     case Directive_Post_Id_Self: {
       /*
-       * The value of the object identifier referenced by the id parameter shall
-       * be the identifier of the executing thread.
+       * The value of the object identifier referenced by the id parameter
+       * shall be the identifier of the executing thread.
        */
       T_eq_ptr(ctx->id, &ctx->id_value);
       T_eq_u32(ctx->id_value, rtems_task_self());
@@ -524,10 +524,10 @@ static void Directive_Post_Id_Check(
 
     case Directive_Post_Id_LocalTask: {
       /*
-       * The value of the object identifier referenced by the id parameter shall
-       * be the identifier of a local task with a name equal to the name
-       * parameter.  If more than one local task with such a name exists, then it
-       * shall be the identifier of the task with the lowest object index.
+       * The value of the object identifier referenced by the id parameter
+       * shall be the identifier of a local task with a name equal to the name
+       * parameter.  If more than one local task with such a name exists, then
+       * it shall be the identifier of the task with the lowest object index.
        */
       T_eq_ptr(ctx->id, &ctx->id_value);
       T_eq_u32(ctx->id_value, ctx->id_local_task);
@@ -536,13 +536,14 @@ static void Directive_Post_Id_Check(
 
     case Directive_Post_Id_RemoteTask: {
       /*
-       * The value of the object identifier referenced by the id parameter shall
-       * be the identifier of a remote task on a eligible node defined by the node
-       * parameter with a name equal to the name parameter.  If more than one task
-       * with such a name exists on the same node, then it shall be the identifier
-       * of the task with the lowest object index.  If more than one task with
-       * such a name exists on different eligible nodes, then it shall be the
-       * identifier of the task with the lowest node index.
+       * The value of the object identifier referenced by the id parameter
+       * shall be the identifier of a remote task on a eligible node defined by
+       * the node parameter with a name equal to the name parameter.  If more
+       * than one task with such a name exists on the same node, then it shall
+       * be the identifier of the task with the lowest object index.  If more
+       * than one task with such a name exists on different eligible nodes,
+       * then it shall be the identifier of the task with the lowest node
+       * index.
        */
       T_eq_ptr(ctx->id, &ctx->id_value);
       T_eq_u32(ctx->id_value, ctx->id_remote_task);
diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py
index 0eb49fe..204e7c9 100644
--- a/rtemsspec/validation.py
+++ b/rtemsspec/validation.py
@@ -215,7 +215,7 @@ class _TestItem:
                 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.wrap(self.substitute_text(check["brief"]))
                     content.append(self.substitute_text(check["code"]))
         return actions
 
@@ -808,7 +808,7 @@ class _ActionRequirementTestItem(_TestItem):
                         content.add(f"case {enum[state_index + 1]}: {{")
                         with content.indent():
                             with content.comment_block():
-                                content.append(
+                                content.wrap(
                                     self.substitute_text(state["text"]))
                             content.append(
                                 self.substitute_code(state["test-code"]))



More information about the vc mailing list