From: Victor Julien Date: Wed, 4 Jun 2025 09:32:01 +0000 (+0200) Subject: run: support multi processing on BSD's X-Git-Tag: suricata-7.0.11~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2537%2Fhead;p=thirdparty%2Fsuricata-verify.git run: support multi processing on BSD's Should be supported on all but WIN32. --- diff --git a/run.py b/run.py index 177341fbc..136109878 100755 --- a/run.py +++ b/run.py @@ -48,7 +48,7 @@ import platform VALIDATE_EVE = False WIN32 = sys.platform == "win32" -LINUX = sys.platform.startswith("linux") +MP = not WIN32 suricata_yaml = "suricata.yaml" if WIN32 else "./suricata.yaml" # Determine the Suricata binary @@ -59,7 +59,7 @@ else: PROC_TIMEOUT=300 -if LINUX: +if MP: manager = mp.Manager() lock = mp.Lock() failedLogs = manager.list() @@ -1132,7 +1132,7 @@ def main(): help="Clean up output directories of passing tests") parser.add_argument("--no-validation", action="store_true", help="Disable EVE validation") parser.add_argument("patterns", nargs="*", default=[]) - if LINUX: + if MP: parser.add_argument("-j", type=int, default=min(8, mp.cpu_count()), help="Number of jobs to run") args = parser.parse_args() @@ -1218,7 +1218,7 @@ def main(): # Sort alphabetically. tests.sort() - if LINUX and args.j > 1: + if MP and args.j > 1: run_mp(args.j, tests, dirpath, args, cwd, suricata_config) else: run_single(tests, dirpath, args, cwd, suricata_config)