summaryrefslogtreecommitdiffstats
path: root/conftest.py
diff options
context:
space:
mode:
authorduerpei <duep.fnst@fujitsu.com>2022-09-03 15:48:31 +0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-12-08 05:59:37 +0000
commit39b04de14116e2a681dc6bad474dc76620d2de57 (patch)
tree634a47628bfbe355e658aa27e73972adfdf73750 /conftest.py
parent85e3c12681faca0519ca995a82feeb7709397ca2 (diff)
agl-test-framework: add "XPASS" and "XFAIL" states
Adjust the test framework , add "XPASS" and "XFAIL" states for the result of test case, and delete useless code by the way. Bug-AGL: SPEC-4345 Signed-off-by: duerpei <duep.fnst@fujitsu.com> Change-Id: I5763dc27caef956fb6632fcb59d9f95d671f4766
Diffstat (limited to 'conftest.py')
-rw-r--r--conftest.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/conftest.py b/conftest.py
index 5dea9a4..512c1ba 100644
--- a/conftest.py
+++ b/conftest.py
@@ -75,10 +75,12 @@ def get_summary_data(report_files):
with open(report_json,'r') as f:
data = json.load(f)
- total = passed = failed = skipped = 0
+ total = passed = xpassed = failed = xfailed = skipped = 0
total = data["collected"]
passed = data["passed"]
+ xpassed = data["xpassed"]
failed = data["failed"]
+ xfailed = data["xfailed"]
skipped = data["skipped"]
test_status = data["test_status"]
test_name = data["test_name"]
@@ -86,7 +88,9 @@ def get_summary_data(report_files):
this_summary = {
'total': total,
'passed': passed,
+ 'xpassed': xpassed,
'failed': failed,
+ 'xfailed': xfailed,
'skipped': skipped,
'test_status': test_status,
}
@@ -139,7 +143,9 @@ def get_summary_report_html(summary_data,zip_name):
html = html + "<th><font color = \"white\">test suite</font></th>"
html = html + "<th><font color = \"white\">status</font></th>"
html = html + "<th><font color = \"white\">pass</font></th>"
+ html = html + "<th><font color = \"white\">xpass</font></th>"
html = html + "<th><font color = \"white\">fail</font></th>"
+ html = html + "<th><font color = \"white\">xfail</font></th>"
html = html + "<th><font color = \"white\">skip</font></th>"
html = html + "</tr>"
@@ -157,7 +163,9 @@ def get_summary_report_html(summary_data,zip_name):
html = html + "<th>" + test_suite + "</th>"
html = html + "<th>" + summary_data[test_suite]["test_status"] + "</th>"
html = html + "<th>" + str(summary_data[test_suite]["passed"]) + "</th>"
+ html = html + "<th>" + str(summary_data[test_suite]["xpassed"]) + "</th>"
html = html + "<th>" + str(summary_data[test_suite]["failed"]) + "</th>"
+ html = html + "<th>" + str(summary_data[test_suite]["xfailed"]) + "</th>"
html = html + "<th>" + str(summary_data[test_suite]["skipped"]) + "</th>"
html = html + "</tr>"