[llvm] Change update_xxx_checks to continue on error when processing mutliple inputs (PR #137728)

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 13:43:48 PDT 2025


================
@@ -570,13 +572,16 @@ def main():
     if "llvm-mca" not in os.path.basename(args.llvm_mca_binary):
         _warn("unexpected binary name: {}".format(args.llvm_mca_binary))
 
+    returncode = 0
     for ti in common.itertests(args.tests, parser, script_name=script_name):
         try:
             update_test_file(ti.args, ti.path, ti.test_autogenerated_note)
         except Exception:
-            common.warn("Error processing file", test_file=ti.path)
-            raise
-    return 0
+            stderr.write(f"Error: Failed to update test {ti.path}\n")
+            print_exc()
+            returncode = 1
+    return returncode
+
 
 if __name__ == "__main__":
     try:
----------------
MatzeB wrote:

was contemplating this as well, but trying to avoid extra changes. Anyway will remove the try/catch from main and make it look more like the other scripts.

https://github.com/llvm/llvm-project/pull/137728


More information about the llvm-commits mailing list