From d6af562a5a296779927ad58f99db0559c1043c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Fri, 30 Aug 2024 10:28:09 +0200 Subject: [PATCH] Add support for unlimited tests This makes `--test-limit 0` run indefinitely, in line with medusa's behavior. --- lib/Echidna/Campaign.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Echidna/Campaign.hs b/lib/Echidna/Campaign.hs index dad687231..e79a3c94c 100644 --- a/lib/Echidna/Campaign.hs +++ b/lib/Echidna/Campaign.hs @@ -261,7 +261,7 @@ runFuzzWorker callback vm dict workerId initialCorpus testLimit = do shrink >> lift callback >> run -- no shrinking work, fuzz - | (null tests || any isOpen tests) && ncalls < testLimit -> + | (null tests || any isOpen tests) && (ncalls < testLimit || testLimit <= 0) -> fuzz >> lift callback >> run -- NOTE: this is a hack which forces shrinking of optimization tests