diff options
author | K900 <me@0upti.me> | 2024-02-26 13:30:43 +0300 |
---|---|---|
committer | K900 <me@0upti.me> | 2024-02-27 23:15:59 +0300 |
commit | 423098c284063106bf15f669a7d5b0665d35be54 (patch) | |
tree | 786164530f72e8e19af66f5b694516cd9ab4ca25 /nixos/lib/test-script-prepend.py | |
parent | 786f391922ed14f8bf4bc4de7ed96dd8fa234829 (diff) |
nixos/lib/test-driver: drop LegacyStartCommand, clean up create_machine API
We can finally do this now that it's no longer used.
Diffstat (limited to 'nixos/lib/test-script-prepend.py')
-rw-r--r-- | nixos/lib/test-script-prepend.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/lib/test-script-prepend.py b/nixos/lib/test-script-prepend.py index 15e59ce01047d..77e913ff04587 100644 --- a/nixos/lib/test-script-prepend.py +++ b/nixos/lib/test-script-prepend.py @@ -26,6 +26,17 @@ class PollingConditionProtocol(Protocol): raise Exception("This is just type information for the Nix test driver") +class CreateMachineProtocol(Protocol): + def __call__( + self, + start_command: str, + *, + name: Optional[str] = None, + keep_vm_state: bool = False, + ) -> Machine: + raise Exception("This is just type information for the Nix test driver") + + start_all: Callable[[], None] subtest: Callable[[str], ContextManager[None]] retry: RetryProtocol @@ -34,7 +45,7 @@ machines: List[Machine] vlans: List[VLan] driver: Driver log: Logger -create_machine: Callable[[Dict[str, Any]], Machine] +create_machine: CreateMachineProtocol run_tests: Callable[[], None] join_all: Callable[[], None] serial_stdout_off: Callable[[], None] |