Skip to content

Commit

Permalink
tests: adjust report fields to the values expected by Wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
KKoukiou committed Jan 23, 2025
1 parent 94ef266 commit 5575849
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/anacondalib.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,20 @@ def install(self, needs_confirmation, button_text="Install"):
def appendResultsToReport(self):
with open(self.report_file, "r+") as f:
test_name = f"{self.__class__.__name__}.{self._testMethodName}"
firmware = "uefi" if self.is_efi else "bios"
firmware = "UEFI" if self.is_efi else "BIOS"
arch = "x86_64"
error = super().getError()
status = "fail" if error else "pass"
# Add the new entry in the "tests" array in the JSON report file
data = json.load(f)
new_entry = {
"arch": arch,
"test_name": test_name,
"firmware": firmware,
"env": f"{arch} {firmware}",
"status": status,
"error": error,
"openqa_test": self.openqa_test,
"openqa_test": self.openqa_test.split("/")[-1],
"wikictms_section": self.wikictms_section
}
data["tests"].append(new_entry)
Expand Down

0 comments on commit 5575849

Please sign in to comment.