summaryrefslogtreecommitdiff
path: root/rtemsspec/validation.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-08 10:26:30 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-08 11:05:49 +0100
commitd6db730a8ea0abb74cc72cbe64c64f7497be5182 (patch)
tree762f260fc9ba72f87a235ba246c090a2fb8a6a12 /rtemsspec/validation.py
parent91b8e875f147af9850b91d855884334522c537da (diff)
validation: Move support code before fixture
Diffstat (limited to 'rtemsspec/validation.py')
-rw-r--r--rtemsspec/validation.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py
index 471b318e..0868149d 100644
--- a/rtemsspec/validation.py
+++ b/rtemsspec/validation.py
@@ -382,8 +382,7 @@ class _TestItem:
self.add_header_body(content, header)
content.write(os.path.join(base_directory, header["target"]))
- def _add_context_and_fixture(self, content: CContent) -> Optional[str]:
- instance = self.add_context(content)
+ def _add_fixture(self, content: CContent, instance: str) -> Optional[str]:
if instance == "NULL":
self._context = "void"
do_wrap = False
@@ -445,8 +444,9 @@ class _TestItem:
test_case_to_suites: Dict[str, List["_TestItem"]]) -> None:
""" Generates the content. """
self.add_test_case_description(content, test_case_to_suites)
- fixture = self._add_context_and_fixture(content)
+ instance = self.add_context(content)
content.add(self.substitute_code(self["test-support"]))
+ fixture = self._add_fixture(content, instance)
self._mapper.reset()
actions = self._add_test_case_actions(content)
header = self["test-header"]