[rtems-central commit] validation: Move support code before fixture
Sebastian Huber
sebh at rtems.org
Tue Nov 9 14:47:48 UTC 2021
Module: rtems-central
Branch: master
Commit: d6db730a8ea0abb74cc72cbe64c64f7497be5182
Changeset: http://git.rtems.org/rtems-central/commit/?id=d6db730a8ea0abb74cc72cbe64c64f7497be5182
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Nov 8 10:26:30 2021 +0100
validation: Move support code before fixture
---
rtemsspec/validation.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py
index 471b318..0868149 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"]
More information about the vc
mailing list