|
@@ -6,6 +6,7 @@ import dataclasses
|
|
|
import os
|
|
|
import pathlib
|
|
|
import string
|
|
|
+import traceback
|
|
|
|
|
|
from . import validate
|
|
|
from .validate import LinuxBinary, PlatformBinary, WindowsBinary
|
|
@@ -39,6 +40,7 @@ def main() -> None:
|
|
|
)
|
|
|
parser.add_argument("-o", "--output-directory", type=pathlib.Path)
|
|
|
parser.add_argument("--match", dest="matches", type=str, action="append")
|
|
|
+ parser.add_argument("--fail-fast", action="store_true")
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
@@ -91,6 +93,9 @@ def main() -> None:
|
|
|
except Exception as e:
|
|
|
failed = True
|
|
|
print("- [FAIL]", name, f"({type(e).__name__}):", e)
|
|
|
+ if args.fail_fast:
|
|
|
+ traceback.print_exception(e)
|
|
|
+ return
|
|
|
|
|
|
if args.output_directory:
|
|
|
if failed:
|
|
@@ -111,6 +116,9 @@ def main() -> None:
|
|
|
print("- All checks passed; wrote output file")
|
|
|
except Exception as e:
|
|
|
print(f"- Error writing output file; skipped ({type(e).__name__}):", e)
|
|
|
+ if args.fail_fast:
|
|
|
+ traceback.print_exception(e)
|
|
|
+ return
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|