nixos-test-driver: reintroduce --test-script flag (#533988)

This commit is contained in:
lassulus
2026-07-20 14:30:44 +00:00
committed by GitHub
@@ -89,6 +89,11 @@ def main() -> None:
type=Path,
required=True,
)
arg_parser.add_argument(
"--test-script",
help="path to a test script to run, taking precedence over the one defined in the config file",
type=Path,
)
arg_parser.add_argument(
"--keep-vm-state",
help=argparse.SUPPRESS,
@@ -163,8 +168,12 @@ def main() -> None:
if args.debug_hook_attach is not None:
debugger = Debug(logger, args.debug_hook_attach)
config = load_driver_configuration(args.config)
if args.test_script is not None:
config.test_script = args.test_script
with Driver(
config=load_driver_configuration(args.config),
config=config,
out_dir=output_directory,
logger=logger,
keep_machine_state=args.keep_machine_state,