]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
patchtest: return non-zero exit code on test failure
authorNaftaly RALAMBOARIVONY <naftaly.ralamboarivony@smile.fr>
Wed, 1 Apr 2026 13:45:32 +0000 (15:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Apr 2026 12:10:36 +0000 (13:10 +0100)
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 <naftaly.ralamboarivony@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/patchtest

index 9218db232a77516d2a8bdcd967521b884f0de89d..143cf08572f1622db0e758b81a66a5fddc12927a 100755 (executable)
@@ -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