results to status
This commit is contained in:
parent
27a0ff8a2e
commit
093818bc81
2 changed files with 11 additions and 6 deletions
|
|
@ -37,6 +37,7 @@ class DirManager:
|
||||||
self.STATES,
|
self.STATES,
|
||||||
self.ENV_FILES,
|
self.ENV_FILES,
|
||||||
self.RESULTS,
|
self.RESULTS,
|
||||||
|
self.STATUS,
|
||||||
]
|
]
|
||||||
for d in dirs:
|
for d in dirs:
|
||||||
d.mkdir(exist_ok=True)
|
d.mkdir(exist_ok=True)
|
||||||
|
|
@ -69,6 +70,10 @@ class DirManager:
|
||||||
def RESULTS(self):
|
def RESULTS(self):
|
||||||
return self.SESSION / "results"
|
return self.SESSION / "results"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def STATUS(self):
|
||||||
|
return self.SESSION / "status"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def RECIPES(self):
|
def RECIPES(self):
|
||||||
return self.recipes_dir
|
return self.recipes_dir
|
||||||
|
|
|
||||||
|
|
@ -119,13 +119,13 @@ class Runner:
|
||||||
other than 'passed' will be deleted"""
|
other than 'passed' will be deleted"""
|
||||||
|
|
||||||
already_passed = False
|
already_passed = False
|
||||||
for result in self.DIR.RESULTS.glob("*"):
|
for status in self.DIR.STATUS.glob("*"):
|
||||||
if identifier_string in result.name:
|
if identifier_string in status.name:
|
||||||
# process any result file (passed / failed / skipped) if it exists
|
# process any result file (passed / failed / skipped) if it exists
|
||||||
if "passed" in result.name:
|
if "passed" in status.name:
|
||||||
already_passed = True
|
already_passed = True
|
||||||
elif remove_existing:
|
elif remove_existing:
|
||||||
result.unlink()
|
status.unlink()
|
||||||
return already_passed
|
return already_passed
|
||||||
|
|
||||||
def _call_pytest(self, full_test_path: Path) -> int:
|
def _call_pytest(self, full_test_path: Path) -> int:
|
||||||
|
|
@ -189,7 +189,7 @@ class Runner:
|
||||||
if isinstance(result, int):
|
if isinstance(result, int):
|
||||||
result = cls.result_int_to_str(result)
|
result = cls.result_int_to_str(result)
|
||||||
full_name = cls.combine_names(result, identifier_string)
|
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 _:
|
with open(file_path, "w") as _:
|
||||||
pass # create empty file
|
pass # create empty file
|
||||||
|
|
||||||
|
|
@ -198,7 +198,7 @@ class Runner:
|
||||||
|
|
||||||
# todo: what about conditional setups?
|
# 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 = []
|
results = []
|
||||||
for dependency in self.dependencies:
|
for dependency in self.dependencies:
|
||||||
dependency_runner = self.coordinator.RUNNER_DICT[dependency]
|
dependency_runner = self.coordinator.RUNNER_DICT[dependency]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue