[rtems-central commit] spec: Add runtime measurement test case item type
Sebastian Huber
sebh at rtems.org
Fri Nov 13 10:09:47 UTC 2020
Module: rtems-central
Branch: master
Commit: 060008e5fbe3a631f258de0b14441a4a03ec9b62
Changeset: http://git.rtems.org/rtems-central/commit/?id=060008e5fbe3a631f258de0b14441a4a03ec9b62
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Nov 11 13:17:46 2020 +0100
spec: Add runtime measurement test case item type
---
spec/spec/requirement-action-condition.yml | 4 +-
spec/spec/requirement-action-state.yml | 2 +-
spec/spec/requirement-action.yml | 8 +-
spec/spec/runtime-measurement-params.yml | 27 +++++++
spec/spec/runtime-measurement-test.yml | 87 ++++++++++++++++++++++
...test-context-list.yml => test-context-list.yml} | 6 +-
...nt-action-test-context.yml => test-context.yml} | 4 +-
spec/spec/test-run-param.yml | 2 +-
...on-test-fixture.yml => test-support-method.yml} | 14 ++--
9 files changed, 134 insertions(+), 20 deletions(-)
diff --git a/spec/spec/requirement-action-condition.yml b/spec/spec/requirement-action-condition.yml
index 36fc34c..46a31a3 100644
--- a/spec/spec/requirement-action-condition.yml
+++ b/spec/spec/requirement-action-condition.yml
@@ -22,7 +22,7 @@ spec-info:
The epilogue code is placed in the test condition preparation or
check before the state-specific code. The code may use a local
variable ``ctx`` which points to the test context, see
- ${requirement-action-test-context:/spec-name}.
+ ${test-context:/spec-name}.
spec-type: optional-str
test-prologue:
description: |
@@ -30,7 +30,7 @@ spec-info:
The prologue code is placed in the test condition preparation or
check after the state-specific code. The code may use a local
variable ``ctx`` which points to the test context, see
- ${requirement-action-test-context:/spec-name}.
+ ${test-context:/spec-name}.
spec-type: optional-str
description: |
This set of attributes defines an action pre-condition or post-condition.
diff --git a/spec/spec/requirement-action-state.yml b/spec/spec/requirement-action-state.yml
index 8b1e55b..374f019 100644
--- a/spec/spec/requirement-action-state.yml
+++ b/spec/spec/requirement-action-state.yml
@@ -17,7 +17,7 @@ spec-info:
description: |
It shall be the test code to prepare or check the state of the
condition. The code may use a local variable ``ctx`` which points to
- the test context, see ${requirement-action-test-context:/spec-name}.
+ the test context, see ${test-context:/spec-name}.
spec-type: str
text:
description: |
diff --git a/spec/spec/requirement-action.yml b/spec/spec/requirement-action.yml
index e588a73..0e5a4eb 100644
--- a/spec/spec/requirement-action.yml
+++ b/spec/spec/requirement-action.yml
@@ -160,7 +160,7 @@ spec-info:
spec-type: optional-str
test-context:
description: null
- spec-type: requirement-action-test-context-list
+ spec-type: test-context-list
test-context-support:
description: |
If the value is present, then it shall be the test context support
@@ -190,10 +190,10 @@ spec-info:
spec-type: optional-str
test-setup:
description: null
- spec-type: requirement-action-test-fixture
+ spec-type: test-support-method
test-stop:
description: null
- spec-type: requirement-action-test-fixture
+ spec-type: test-support-method
test-support:
description: |
If the value is present, then it shall be the test case support code.
@@ -205,7 +205,7 @@ spec-info:
spec-type: str
test-teardown:
description: null
- spec-type: requirement-action-test-fixture
+ spec-type: test-support-method
transition-map:
description: null
spec-type: requirement-action-transition-list
diff --git a/spec/spec/runtime-measurement-params.yml b/spec/spec/runtime-measurement-params.yml
new file mode 100644
index 0000000..4e70892
--- /dev/null
+++ b/spec/spec/runtime-measurement-params.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:
+ sample-count:
+ description: |
+ It shall be the sample count of the runtime measurement context.
+ spec-type: int
+ description: |
+ This set of attributes defines parameters of the runtime measurement test
+ case.
+ generic-attributes:
+ description: null
+ key-spec-type: name
+ value-spec-type: any
+ mandatory-attributes: all
+spec-name: Runtime Measurement Parameter Set
+spec-type: runtime-measurement-params
+type: spec
diff --git a/spec/spec/runtime-measurement-test.yml b/spec/spec/runtime-measurement-test.yml
new file mode 100644
index 0000000..bc7e8ec
--- /dev/null
+++ b/spec/spec/runtime-measurement-test.yml
@@ -0,0 +1,87 @@
+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
+- role: spec-refinement
+ spec-key: type
+ spec-value: runtime-measurement-test
+ uid: root
+spec-description: null
+spec-example: null
+spec-info:
+ dict:
+ attributes:
+ params:
+ description: null
+ spec-type: runtime-measurement-params
+ test-brief:
+ description: |
+ If the value is present, then it shall be the test case brief
+ description.
+ spec-type: optional-str
+ test-cleanup:
+ description: |
+ If the value is present, then it shall be the measure runtime request
+ cleanup method. The method is called after each measure runtime
+ request.
+ spec-type: test-support-method
+ test-context:
+ description: null
+ spec-type: test-context-list
+ test-context-support:
+ description: |
+ If the value is present, then it shall be the test context support
+ code. The context support code is placed at file scope before the
+ test context definition.
+ spec-type: optional-str
+ test-description:
+ description: |
+ If the value is present, then it shall be the test case description.
+ spec-type: optional-str
+ test-includes:
+ description: |
+ It shall be a list of header files included via ``#include <...>``.
+ spec-type: list-str
+ test-local-includes:
+ description: |
+ It shall be a list of header files included via ``#include "..."``.
+ spec-type: list-str
+ test-prepare:
+ description: |
+ If the value is present, then it shall be the measure runtime request
+ prepare method. The method is called before each measure runtime
+ request.
+ spec-type: test-support-method
+ test-setup:
+ description: |
+ If the value is present, then it shall be the test case setup fixture
+ method.
+ spec-type: test-support-method
+ test-stop:
+ description: |
+ If the value is present, then it shall be the test case stop fixture
+ method.
+ spec-type: test-support-method
+ test-support:
+ description: |
+ If the value is present, then it shall be the test case support code.
+ The support code is placed at file scope before the test case code.
+ spec-type: optional-str
+ test-target:
+ description: |
+ It shall be the path to the generated test case source file.
+ spec-type: str
+ test-teardown:
+ description: |
+ If the value is present, then it shall be the test case teardown
+ fixture method.
+ spec-type: test-support-method
+ description: |
+ This set of attributes specifies a runtime measurement test case.
+ mandatory-attributes: all
+spec-name: Runtime Measurement Test Item Type
+spec-type: runtime-measurement-test
+type: spec
diff --git a/spec/spec/requirement-action-test-context-list.yml b/spec/spec/test-context-list.yml
similarity index 66%
rename from spec/spec/requirement-action-test-context-list.yml
rename to spec/spec/test-context-list.yml
index ae9e086..a0e6f38 100644
--- a/spec/spec/requirement-action-test-context-list.yml
+++ b/spec/spec/test-context-list.yml
@@ -10,7 +10,7 @@ spec-example: null
spec-info:
list:
description: null
- spec-type: requirement-action-test-context
-spec-name: Action Requirement Test Context List
-spec-type: requirement-action-test-context-list
+ spec-type: test-context
+spec-name: Test Context List
+spec-type: test-context-list
type: spec
diff --git a/spec/spec/requirement-action-test-context.yml b/spec/spec/test-context.yml
similarity index 90%
rename from spec/spec/requirement-action-test-context.yml
rename to spec/spec/test-context.yml
index b5ef383..fddd78c 100644
--- a/spec/spec/requirement-action-test-context.yml
+++ b/spec/spec/test-context.yml
@@ -27,6 +27,6 @@ spec-info:
This set of attributes defines an action requirement test context member.
mandatory-attributes: all
none: null
-spec-name: Action Requirement Test Context Member
-spec-type: requirement-action-test-context
+spec-name: Test Context Member
+spec-type: test-context
type: spec
diff --git a/spec/spec/test-run-param.yml b/spec/spec/test-run-param.yml
index 77c0d3c..fcad7f5 100644
--- a/spec/spec/test-run-param.yml
+++ b/spec/spec/test-run-param.yml
@@ -31,7 +31,7 @@ spec-info:
This set of attributes specifies a parameter for the test run function.
In case this parameter is used in an ${requirement-action:/spec-name}
item, then the parameter is also added as a member to the test context,
- see ${requirement-action-test-context:/spec-name}.
+ see ${test-context:/spec-name}.
mandatory-attributes: all
spec-name: Test Run Parameter
spec-type: test-run-param
diff --git a/spec/spec/requirement-action-test-fixture.yml b/spec/spec/test-support-method.yml
similarity index 66%
rename from spec/spec/requirement-action-test-fixture.yml
rename to spec/spec/test-support-method.yml
index 15b7c5d..bce9651 100644
--- a/spec/spec/requirement-action-test-fixture.yml
+++ b/spec/spec/test-support-method.yml
@@ -12,22 +12,22 @@ spec-info:
attributes:
brief:
description: |
- It shall be the test fixture method brief description.
+ It shall be the test support method brief description.
spec-type: optional-str
code:
description: |
- It shall be the test fixture method code. The code may use a local
+ It shall be the test support method code. The code may use a local
variable ``ctx`` which points to the test context, see
- ${requirement-action-test-context:/spec-name}.
+ ${test-context:/spec-name}.
spec-type: str
description:
description: |
- It shall be the test fixture method description.
+ It shall be the test support method description.
spec-type: optional-str
description: |
- This set of attributes defines an action requirement test fixture method.
+ This set of attributes defines an action requirement test support method.
mandatory-attributes: all
none: null
-spec-name: Action Requirement Test Fixture Method
-spec-type: requirement-action-test-fixture
+spec-name: Test Support Method
+spec-type: test-support-method
type: spec
More information about the vc
mailing list