Run WARNINGS check.
Definition at line 529 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()
def python.Checks.WarningsComparisonCheck.run |
( |
|
self, |
|
|
WorkflowTest |
test |
|
) |
| |
Definition at line 532 of file Checks.py.
532 def run(self, test: WorkflowTest):
533 self.logger.
info(
"-----------------------------------------------------")
534 self.logger.
info(f
"Running {test.ID} WARNINGS Check\n")
537 for step
in test.steps:
538 log_name = f
"log.{step}"
539 reference_log = test.reference_path / log_name
540 validation_log = test.validation_path / log_name
542 warnings_validation = warnings_count (validation_log)
545 for w
in warnings_reference:
548 for w
in warnings_validation:
555 if len(warnings_validation) > len(warnings_reference):
556 self.logger.
error(f
"Validation log file {validation_log} has {len(warnings_validation) - len(warnings_reference)} more warning(s) than the reference log file {reference_log}")
557 self.logger.
error(
"Please remove the new warning message(s):")
561 elif len(warnings_validation) < len(warnings_reference):
562 self.logger.
info(f
"Validation log file {validation_log} has {len(warnings_reference) - len(warnings_validation)} less warnings than the reference log file {reference_log}")
563 self.logger.
info(
"The reduction of unnecessary WARNINGs is much appreciated. Is it expected?")
564 self.logger.
info(
"The following warning messages have been removed:")
569 self.logger.
info(f
"Validation log file {validation_log} has the same number of warnings as the reference log file {reference_log}")
573 self.logger.
info(
"Passed!\n")
575 self.logger.
error(
"Failed!\n")
◆ logger
python.Test.WorkflowCheck.logger |
|
inherited |
◆ setup
python.Test.WorkflowCheck.setup |
|
inherited |
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.