Run FPE check.
Definition at line 580 of file Checks.py.
◆ reference_file()
Optional[Path] python.Test.WorkflowCheck.reference_file |
( |
|
self, |
|
|
"WorkflowTest" |
test, |
|
|
str |
file_name |
|
) |
| |
|
inherited |
Definition at line 91 of file Tools/WorkflowTestRunner/python/Test.py.
91 def reference_file(self, test:
"WorkflowTest", file_name: str) -> Optional[Path]:
92 reference_path: Path = test.reference_path
93 reference_file = reference_path / file_name
96 if self.setup.validation_only:
98 reference_revision = references_map[f
"{test.ID}"]
99 cvmfs_path = Path(references_CVMFS_path)
100 rel_path = Path(self.setup.release_ID) / test.ID / reference_revision
101 reference_path = cvmfs_path / rel_path
102 reference_file = reference_path / file_name
104 if not reference_path.exists():
105 self.logger.
error(f
"CVMFS reference location {reference_path} does not exist!")
108 if references_override_url
is not None:
111 url = references_override_url
112 if not url.endswith(
"/"): url +=
"/"
113 url +=
str(rel_path / file_name)
114 self.logger.
info(
"Checking for reference override at %s", url)
115 if requests.head(url).ok:
116 reference_file = Path.cwd() / f
"reference_{file_name}"
117 self.logger.
info(
"Downloading reference from %s to %s", url, reference_file)
118 r = requests.get(url, stream=
True)
119 with reference_file.open(
'wb')
as f:
120 for chunk
in r.iter_content(chunk_size=1024):
124 self.logger.
info(
"No reference override found")
126 return reference_file
◆ run()
Definition at line 588 of file Checks.py.
588 def run(self, test: WorkflowTest):
589 self.logger.
info(
"-----------------------------------------------------")
590 self.logger.
info(f
"Running {test.ID} FPE Check")
593 for step
in test.steps:
594 log = test.validation_path / f
"log.{step}"
597 with log.open()
as file:
598 last_stack_trace =
None
600 if "WARNING FPE" in line:
601 last_stack_trace =
None
603 for part
in reversed(line.split()):
612 last_stack_trace = []
613 stack_traces[fpe] = last_stack_trace
614 elif "FPE stacktrace" in line
and last_stack_trace
is not None:
616 last_stack_trace.append(line.strip()[9:])
619 msgLvl = logging.WARNING
if test.run
in self.ignoreTestRuns
or test.type
in self.ignoreTestTypes
or test.ID
in self.ignoreTestIDs
else logging.ERROR
621 self.logger.
log(msgLvl, f
" {step} validation test step FPEs")
622 for fpe, count
in sorted(fpes.items(), key=
lambda item: item[1]):
623 self.logger.
log(msgLvl, f
"{count:>5} {fpe}")
624 for fpe
in fpes.keys():
625 self.logger.
log(msgLvl,
"-----------------------------------------------------")
626 self.logger.
log(msgLvl, f
" first stack trace for algorithm {fpe}:")
627 for line
in stack_traces[fpe]:
628 self.logger.
log(msgLvl, line)
629 self.logger.
log(msgLvl,
"-----------------------------------------------------")
632 self.logger.
info(
"Passed!\n")
633 elif test.run
in self.ignoreTestRuns
or test.type
in self.ignoreTestTypes
or test.ID
in self.ignoreTestIDs:
634 self.logger.warning(
"Failed!")
635 self.logger.warning(
"Check disabled due to irreproducibilities!\n")
638 self.logger.
error(
"Failed!\n")
◆ ignoreTestIDs
python.Checks.FPECheck.ignoreTestIDs |
|
static |
◆ ignoreTestRuns
python.Checks.FPECheck.ignoreTestRuns |
|
static |
◆ ignoreTestTypes
python.Checks.FPECheck.ignoreTestTypes |
|
static |
◆ logger
python.Test.WorkflowCheck.logger |
|
inherited |
◆ setup
python.Test.WorkflowCheck.setup |
|
inherited |
The documentation for this class was generated from the following file: