diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-27 14:54:13 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-27 15:29:32 +0200 |
commit | 55e17d23c133681cf4a6a24e5190216f5378f1e8 (patch) | |
tree | b836b35f5fee7732c18fc125fba07a3c80671e53 /spec | |
parent | validation: Support N/A in the action transitions (diff) | |
download | rtems-central-55e17d23c133681cf4a6a24e5190216f5378f1e8.tar.bz2 |
validation: Add ability to skip action transitions
Diffstat (limited to 'spec')
-rw-r--r-- | spec/req/rtems/ident-local.yml | 1 | ||||
-rw-r--r-- | spec/req/rtems/ident.yml | 1 | ||||
-rw-r--r-- | spec/req/rtems/tasks/ident.yml | 1 | ||||
-rw-r--r-- | spec/spec/requirement-action-skip-reasons.yml | 27 | ||||
-rw-r--r-- | spec/spec/requirement-action-transition-post.yml | 10 | ||||
-rw-r--r-- | spec/spec/requirement-action.yml | 4 |
6 files changed, 44 insertions, 0 deletions
diff --git a/spec/req/rtems/ident-local.yml b/spec/req/rtems/ident-local.yml index 38bf9cdd..9bb542f9 100644 --- a/spec/req/rtems/ident-local.yml +++ b/spec/req/rtems/ident-local.yml @@ -83,6 +83,7 @@ pre-conditions: test-epilogue: null test-prologue: null requirement-type: functional +skip-reasons: {} test-action: | ctx->status = ( *ctx->action )( ctx->name, ctx->id ); test-brief: null diff --git a/spec/req/rtems/ident.yml b/spec/req/rtems/ident.yml index b56603bd..1a9bbfbc 100644 --- a/spec/req/rtems/ident.yml +++ b/spec/req/rtems/ident.yml @@ -136,6 +136,7 @@ pre-conditions: test-epilogue: null test-prologue: null requirement-type: functional +skip-reasons: {} test-action: | ctx->status = ( *ctx->action )( ctx->name, ctx->node, ctx->id ); test-brief: null diff --git a/spec/req/rtems/tasks/ident.yml b/spec/req/rtems/tasks/ident.yml index 0a8171df..3d2d6873 100644 --- a/spec/req/rtems/tasks/ident.yml +++ b/spec/req/rtems/tasks/ident.yml @@ -43,6 +43,7 @@ pre-conditions: test-epilogue: null test-prologue: null requirement-type: functional +skip-reasons: {} test-action: | if ( ctx->id != NULL ) { ctx->status = rtems_task_ident( RTEMS_SELF, 0xdeadbeef, ctx->id ); diff --git a/spec/spec/requirement-action-skip-reasons.yml b/spec/spec/requirement-action-skip-reasons.yml new file mode 100644 index 00000000..75be7ede --- /dev/null +++ b/spec/spec/requirement-action-skip-reasons.yml @@ -0,0 +1,27 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +links: +- role: spec-member + uid: root +spec-description: null +spec-example: null +spec-info: + dict: + attributes: {} + description: | + This set of attributes specifies skip reasons used to justify why + transitions in the transition map are skipped. + generic-attributes: + description: | + The key defines the name of a skip reason. The name can be used in + :ref:`SpecTypeActionRequirementTransitionPostConditions` to skip the + corresponding transitions. The value shall give a reason why the + transitions are skipped. + key-spec-type: requirement-action-name + value-spec-type: str + mandatory-attributes: all +spec-name: Action Requirement Skip Reasons +spec-type: requirement-action-skip-reasons +type: spec diff --git a/spec/spec/requirement-action-transition-post.yml b/spec/spec/requirement-action-transition-post.yml index 7fca2f11..935484e3 100644 --- a/spec/spec/requirement-action-transition-post.yml +++ b/spec/spec/requirement-action-transition-post.yml @@ -22,6 +22,16 @@ spec-info: key-spec-type: requirement-action-name value-spec-type: requirement-action-name mandatory-attributes: all + str: + assert: + and: + - re: ^[A-Z][a-zA-Z0-9]+$ + - not: + eq: NA + description: | + It shall be the name of a skip reason. If a skip reason is given instead + of a listing of post-condition states, then this transition is skipped + and no test code runs for this transition. spec-name: Action Requirement Transition Post-Conditions spec-type: requirement-action-transition-post type: spec diff --git a/spec/spec/requirement-action.yml b/spec/spec/requirement-action.yml index 8eb7b7be..6afa7879 100644 --- a/spec/spec/requirement-action.yml +++ b/spec/spec/requirement-action.yml @@ -81,6 +81,7 @@ spec-example: | test-epilogue: null test-prologue: null requirement-type: functional + skip-reasons: {} test-action: | /* Call the function of the action */ test-brief: null @@ -137,6 +138,9 @@ spec-info: pre-conditions: description: null spec-type: requirement-action-condition-list + skip-reasons: + description: null + spec-type: requirement-action-skip-reasons test-action: description: | It shall be the test action code. |