Skip to content

Commit

Permalink
tests: fix mac-taskpolicy handling in benchmarks on Darwin
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
potsrevennil committed Dec 4, 2024
1 parent 112dbd3 commit ed56b4e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scripts/lib/mlkem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.append(f"taskpolicy -c {mac_taskpolicy}")

# NOTE: We haven't yet decided how to output both opt/no-opt benchmark results
if self.opt.lower() == "all":
Expand Down

0 comments on commit ed56b4e

Please sign in to comment.