From 7946650a1492276ce48c924248518c9b5416d0bb Mon Sep 17 00:00:00 2001 From: J08nY Date: Sat, 17 Aug 2024 23:17:22 +0200 Subject: Add timeout to test-all. --- nix/test_all.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'nix') diff --git a/nix/test_all.py b/nix/test_all.py index 2017a2c..0701acd 100644 --- a/nix/test_all.py +++ b/nix/test_all.py @@ -66,8 +66,11 @@ def test_library(library, test_suite, version): opts = base_options(library) opts.extend(globals()[f"{test_suite.replace('-', '_')}_options"](library)) command = ["nix", "run", f"?submodules=1#{library}.{version}", "--", "test", f"-oyml:results/{library}_{test_suite}_{version}.yml", *opts, test_suite, library] - print(command) - process = sp.run(command) + print(" ".join(command)) + try: + sp.run(command, timeout=60) + except sp.TimeoutExpired: + print(f"{library} {test_suite} {version} timed-out!") def main(): -- cgit v1.2.3-70-g09d2