summaryrefslogtreecommitdiffstats
path: root/rtemsspec
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-04 13:22:15 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-04 14:23:43 +0100
commitf8cd9770fe28836746883a19343508df92c436c8 (patch)
tree015b14ccdb05000cf6b586de65dc328771b2f345 /rtemsspec
parentvalidation: Do not pass NULL context (diff)
downloadrtems-central-f8cd9770fe28836746883a19343508df92c436c8.tar.bz2
spec: Rename test case action attributes
The new attribute keys make it easier to write test cases.
Diffstat (limited to 'rtemsspec')
-rw-r--r--rtemsspec/tests/spec-validation/tc.yml36
-rw-r--r--rtemsspec/tests/spec-validation/tc2.yml24
-rw-r--r--rtemsspec/tests/spec-validation/tc3.yml12
-rw-r--r--rtemsspec/tests/spec-validation/tc5.yml36
-rw-r--r--rtemsspec/tests/spec-validation/tc7.yml8
-rw-r--r--rtemsspec/validation.py8
6 files changed, 62 insertions, 62 deletions
diff --git a/rtemsspec/tests/spec-validation/tc.yml b/rtemsspec/tests/spec-validation/tc.yml
index 782ea763..0ee06063 100644
--- a/rtemsspec/tests/spec-validation/tc.yml
+++ b/rtemsspec/tests/spec-validation/tc.yml
@@ -4,37 +4,37 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Test case action 0 description.
+ action-code: |
/* Test case action 0 code */
checks:
- - check: |
- /* Test case action 0 check 0 code: ${steps/123} */
- description: |
+ - brief: |
Test case action 0 check 0 description.
+ code: |
+ /* Test case action 0 check 0 code: ${steps/123} */
links: []
- - check: |
- /* Test case action 0 check 1 code; step ${step} */
- description: |
+ - brief: |
Test case action 0 check 1 description.
+ code: |
+ /* Test case action 0 check 1 code; step ${step} */
links: []
- description: |
- Test case action 0 description.
links: []
-- action: |
+- action-brief: |
+ Test case action 1 description.
+ action-code: |
/* Test case action 1 code */
checks:
- - check: |
- /* Test case action 1 check 0 code; step ${step} */
- description: |
+ - brief: |
Test case action 1 check 0 description.
+ code: |
+ /* Test case action 1 check 0 code; step ${step} */
links: []
- - check: |
- /* Test case action 1 check 1 code */
- description: |
+ - brief: |
Test case action 1 check 1 description.
+ code: |
+ /* Test case action 1 check 1 code */
links: []
- description: |
- Test case action 1 description.
links: []
test-brief: Test case brief description.
test-context: []
diff --git a/rtemsspec/tests/spec-validation/tc2.yml b/rtemsspec/tests/spec-validation/tc2.yml
index fc389198..0f56f380 100644
--- a/rtemsspec/tests/spec-validation/tc2.yml
+++ b/rtemsspec/tests/spec-validation/tc2.yml
@@ -4,27 +4,27 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Test case 2 action 0 description.
+ action-code: |
/* Test case 2 action 0 code */
checks:
- - check: |
- /* Test case 2 action 0 check 0 code */
- description: |
+ - brief: |
Test case 2 action 0 check 0 description.
+ code: |
+ /* Test case 2 action 0 check 0 code */
links: []
- - check: |
- /* Test case 2 action 0 check 1 code */
- description: |
+ - brief: |
Test case 2 action 0 check 1 description.
+ code: |
+ /* Test case 2 action 0 check 1 code */
links: []
- description: |
- Test case 2 action 0 description.
links: []
-- action: |
+- action-brief: |
+ Test case 2 action 1 description.
+ action-code: |
/* Test case 2 action 1 code */
checks: []
- description: |
- Test case 2 action 1 description.
links: []
test-brief: Test case 2 brief description.
test-context:
diff --git a/rtemsspec/tests/spec-validation/tc3.yml b/rtemsspec/tests/spec-validation/tc3.yml
index f8293a61..0914c522 100644
--- a/rtemsspec/tests/spec-validation/tc3.yml
+++ b/rtemsspec/tests/spec-validation/tc3.yml
@@ -4,16 +4,16 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Test case 3 action 0 description.
+ action-code: |
/* Test case 3 action 0 code */
checks:
- - check: |
- /* Test case 3 action 0 check 0 code; step ${step} */
- description: |
+ - brief: |
Test case 3 action 0 check 0 description.
+ code: |
+ /* Test case 3 action 0 check 0 code; step ${step} */
links: []
- description: |
- Test case 3 action 0 description.
links: []
test-brief: Test case 3 brief description.
test-context: []
diff --git a/rtemsspec/tests/spec-validation/tc5.yml b/rtemsspec/tests/spec-validation/tc5.yml
index 00866c9c..ee603675 100644
--- a/rtemsspec/tests/spec-validation/tc5.yml
+++ b/rtemsspec/tests/spec-validation/tc5.yml
@@ -4,37 +4,37 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
+- action-brief: |
+ Test case action 0 description.
+ action-code: |
/* Test case action 0 code */
checks:
- - check: |
- /* Test case action 0 check 0 code */
- description: |
+ - brief: |
Test case action 0 check 0 description.
+ code: |
+ /* Test case action 0 check 0 code */
links: []
- - check: |
- /* Test case action 0 check 1 code; step ${step} */
- description: |
+ - brief: |
Test case action 0 check 1 description.
+ code: |
+ /* Test case action 0 check 1 code; step ${step} */
links: []
- description: |
- Test case action 0 description.
links: []
-- action: |
+- action-brief: |
+ Test case action 1 description.
+ action-code: |
/* Test case action 1 code */
checks:
- - check: |
- /* Test case action 1 check 0 code; step ${step} */
- description: |
+ - brief: |
Test case action 1 check 0 description.
+ code: |
+ /* Test case action 1 check 0 code; step ${step} */
links: []
- - check: |
- /* Test case action 1 check 1 code */
- description: |
+ - brief: |
Test case action 1 check 1 description.
+ code: |
+ /* Test case action 1 check 1 code */
links: []
- description: |
- Test case action 1 description.
links: []
test-brief: Test case 5 brief description.
test-context: []
diff --git a/rtemsspec/tests/spec-validation/tc7.yml b/rtemsspec/tests/spec-validation/tc7.yml
index bdcf1e04..93797cee 100644
--- a/rtemsspec/tests/spec-validation/tc7.yml
+++ b/rtemsspec/tests/spec-validation/tc7.yml
@@ -4,11 +4,11 @@ copyrights:
enabled-by: true
links: []
test-actions:
-- action: |
- /* ${step} */
- checks: []
- description: |
+- action-brief: |
Action.
+ action-code: |
+ /* ${step} */
+ checks: []
links: []
test-brief: null
test-context: []
diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py
index f2f2d786..64e08f54 100644
--- a/rtemsspec/validation.py
+++ b/rtemsspec/validation.py
@@ -181,10 +181,10 @@ class _TestItem:
if actions:
content.add("This test case performs the following actions:")
for action in actions:
- content.wrap(self.substitute_text(action["description"]),
+ content.wrap(self.substitute_text(action["action-brief"]),
initial_indent="- ")
for check in action["checks"]:
- content.wrap(self.substitute_text(check["description"]),
+ content.wrap(self.substitute_text(check["brief"]),
initial_indent=" - ",
subsequent_indent=" ")
@@ -201,9 +201,9 @@ class _TestItem:
actions.gap = False
actions.call_function(None, method, args)
with content.function("static void", method, params):
- content.add(self.substitute_code(action["action"]))
+ content.add(self.substitute_code(action["action-code"]))
for check in action["checks"]:
- content.append(self.substitute_text(check["check"]))
+ content.append(self.substitute_text(check["code"]))
return actions
def _get_run_params(self, header: Optional[Dict[str, Any]]) -> List[str]: