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>
print("----------------------------------------------------------------------\n")
def main():
+ ret = 0
tmp_patch = False
patch_path = PatchtestParser.patch_path
log_results = PatchtestParser.log_results
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