diff --git a/scripts/lib/mlkem_test.py b/scripts/lib/mlkem_test.py index d935e0b1c..69c2032a3 100644 --- a/scripts/lib/mlkem_test.py +++ b/scripts/lib/mlkem_test.py @@ -602,11 +602,7 @@ def bench( output = False if mac_taskpolicy: - if exec_wrapper: - logging.error(f"cannot set both --mac-taskpolicy and --exec-wrapper") - sys.exit(1) - else: - exec_wrapper = f"taskpolicy -c {mac_taskpolicy}" + self.cmd_prefix.extend(["taskpolicy", "-c", f"{mac_taskpolicy}"]) # NOTE: We haven't yet decided how to output both opt/no-opt benchmark results if self.opt.lower() == "all": @@ -713,19 +709,27 @@ def all(opt: bool): def cbmc(self, k): config_logger(self.verbose) + def run_cbmc(mlkem_k): envvars = {"MLKEM_K": mlkem_k} cpucount = os.cpu_count() p = subprocess.Popen( - ["python3", "run-cbmc-proofs.py", "--summarize", "--no-coverage", f"-j{cpucount}"], + [ + "python3", + "run-cbmc-proofs.py", + "--summarize", + "--no-coverage", + f"-j{cpucount}", + ], cwd="cbmc/proofs", env=os.environ.copy() | envvars, ) p.communicate() assert p.returncode == 0 + if k == "ALL": run_cbmc("2") run_cbmc("3") run_cbmc("4") - else: + else: run_cbmc(k)