From 44f30fc5d839408116430d235fc36f36b9bccf5f Mon Sep 17 00:00:00 2001 From: Andrea Cervesato Date: Thu, 14 Mar 2024 12:01:43 +0100 Subject: [PATCH] Recognize when LTP test returns zero The previous code was not taking in consideration the return code 0, so when test text was not acquired correctly, the text process ended up to recognize test failure. --- libkirk/ltp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libkirk/ltp.py b/libkirk/ltp.py index 0ee942c..12e84eb 100644 --- a/libkirk/ltp.py +++ b/libkirk/ltp.py @@ -362,7 +362,9 @@ async def read_result( elif not error: failed = 1 - if retcode in (2, -1): + if retcode == 0: + status = ResultStatus.PASS + elif retcode in (2, -1): status = ResultStatus.BROK elif retcode == 4: status = ResultStatus.WARN