results to status

This commit is contained in:
Daniel 2023-12-11 00:41:07 +01:00
parent 27a0ff8a2e
commit 093818bc81
2 changed files with 11 additions and 6 deletions

View file

@ -37,6 +37,7 @@ class DirManager:
self.STATES,
self.ENV_FILES,
self.RESULTS,
self.STATUS,
]
for d in dirs:
d.mkdir(exist_ok=True)
@ -69,6 +70,10 @@ class DirManager:
def RESULTS(self):
return self.SESSION / "results"
@property
def STATUS(self):
return self.SESSION / "status"
@property
def RECIPES(self):
return self.recipes_dir

View file

@ -119,13 +119,13 @@ class Runner:
other than 'passed' will be deleted"""
already_passed = False
for result in self.DIR.RESULTS.glob("*"):
if identifier_string in result.name:
for status in self.DIR.STATUS.glob("*"):
if identifier_string in status.name:
# process any result file (passed / failed / skipped) if it exists
if "passed" in result.name:
if "passed" in status.name:
already_passed = True
elif remove_existing:
result.unlink()
status.unlink()
return already_passed
def _call_pytest(self, full_test_path: Path) -> int:
@ -189,7 +189,7 @@ class Runner:
if isinstance(result, int):
result = cls.result_int_to_str(result)
full_name = cls.combine_names(result, identifier_string)
file_path = DIR.RESULTS / full_name
file_path = DIR.STATUS / full_name
with open(file_path, "w") as _:
pass # create empty file
@ -198,7 +198,7 @@ class Runner:
# todo: what about conditional setups?
passed_tests = [r.name for r in self.DIR.RESULTS.glob("*") if "passed" in r.name]
passed_tests = [r.name for r in self.DIR.STATUS.glob("*") if "passed" in r.name]
results = []
for dependency in self.dependencies:
dependency_runner = self.coordinator.RUNNER_DICT[dependency]