From 3f0ba796b95c830ea00b28e86757e8b4a9250388 Mon Sep 17 00:00:00 2001 From: Piotr Narajowski Date: Wed, 18 Dec 2024 14:27:16 +0100 Subject: [PATCH] pts: add Indecisive test verdict PTS v8.7.4 introduces "Indecisive" test verdict. --- autopts/client.py | 4 ++-- autopts/ptscontrol.py | 2 ++ cliparser.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/autopts/client.py b/autopts/client.py index 02f4d6280c..2e442de62c 100755 --- a/autopts/client.py +++ b/autopts/client.py @@ -551,7 +551,7 @@ def get_result_color(status): return "green" if status == "FAIL": return "red" - if status == "INCONC": + if status in ("INCONC", "INDCSV"): return "yellow" return "white" @@ -953,7 +953,7 @@ def _run_test_case(self, pts, test_case, exceptions, finish_count): if AUTO_PTS_LOCAL: # set fake status and return statuses = ["PASS", "INCONC", "FAIL", "UNKNOWN VERDICT: NONE", - "BTP ERROR", "XML-RPC ERROR", "BTP TIMEOUT"] + "BTP ERROR", "XML-RPC ERROR", "BTP TIMEOUT", "INDCSV"] test_case.status = random.choice(statuses) return diff --git a/autopts/ptscontrol.py b/autopts/ptscontrol.py index c18707674d..a4e35e5237 100644 --- a/autopts/ptscontrol.py +++ b/autopts/ptscontrol.py @@ -165,6 +165,8 @@ def Log(self, log_type, logtype_string, log_time, log_message): if "PASS" in log_message: new_status = "PASS" + elif "INDCSV" in log_message: + new_status = "INDCSV" elif "INCONC" in log_message: new_status = "INCONC" elif "FAIL" in log_message: diff --git a/cliparser.py b/cliparser.py index 545c01a43c..15a915942e 100644 --- a/cliparser.py +++ b/cliparser.py @@ -78,7 +78,7 @@ def __init__(self, cli_support=None, board_names=None, add_help=True): " itself after wrong status.") self.add_argument("--not_recover", nargs='+', - default=['PASS', 'INCONC', 'FAIL', 'NOT_IMPLEMENTED'], + default=['PASS', 'INCONC', 'FAIL', 'NOT_IMPLEMENTED', 'INDCSV'], help="Specify at which statuses autoptsclient should " "try to recover itself.")