From: Naftaly RALAMBOARIVONY Date: Wed, 1 Apr 2026 13:45:32 +0000 (+0200) Subject: patchtest: return non-zero exit code on test failure X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c554c141da5aaebfa2152b6bc3d67a665058052d;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git patchtest: return non-zero exit code on test failure Update patchtest to return a non-zero exit code when a test fails instead of always exiting successfully. This enables proper failure detection in selftests and CI pipelines relying on the command return status. Signed-off-by: Naftaly RALAMBOARIVONY Signed-off-by: Richard Purdie --- diff --git a/scripts/patchtest b/scripts/patchtest index 9218db232a..143cf08572 100755 --- a/scripts/patchtest +++ b/scripts/patchtest @@ -183,6 +183,7 @@ def print_result_message(preresult, postresult): print("----------------------------------------------------------------------\n") def main(): + ret = 0 tmp_patch = False patch_path = PatchtestParser.patch_path log_results = PatchtestParser.log_results @@ -214,13 +215,15 @@ def main(): try: if log_path: - run(patch, log_path) + ret = run(patch, log_path) else: - run(patch) + ret = run(patch) finally: if tmp_patch: os.remove(patch) + return ret + if __name__ == '__main__': ret = 1