From 28988c9380f73dd2bfbe24049db03c2d118c8131 Mon Sep 17 00:00:00 2001 From: "Thing-han, Lim" <15379156+potsrevennil@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:27:59 +0800 Subject: [PATCH] tests: fix mac-taskpolicy handling in benchmarks on Darwin Fixed a bug introduced in PR #449, where the exec_wrapper variable was no longer in scope. This caused the script to abort if --mac-taskpolicy was provided, as it attempted to check the value of exec_wrapper. Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com> --- scripts/lib/mlkem_test.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/lib/mlkem_test.py b/scripts/lib/mlkem_test.py index d935e0b1c..9e82521e3 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":