tests/run-perfbench: Support --heapsize argument and pass to executable.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-11-03 17:33:25 +11:00
parent b52fe52d31
commit 329f8252b9

View File

@ -258,6 +258,7 @@ def main():
cmd_parser.add_argument(
"--emit", default="bytecode", help="MicroPython emitter to use (bytecode or native)"
)
cmd_parser.add_argument("--heapsize", help="heapsize to use (use default if not specified)")
cmd_parser.add_argument("--via-mpy", action="store_true", help="compile code to .mpy first")
cmd_parser.add_argument("--mpy-cross-flags", default="", help="flags to pass to mpy-cross")
cmd_parser.add_argument(
@ -285,6 +286,8 @@ def main():
target.enter_raw_repl()
else:
target = [MICROPYTHON, "-X", "emit=" + args.emit]
if args.heapsize is not None:
target.extend(["-X", "heapsize=" + args.heapsize])
if len(args.files) == 0:
tests_skip = ("benchrun.py",)