Loading nixos/lib/test-driver/test_driver/driver.py +0 −1 Original line number Diff line number Diff line Loading @@ -179,7 +179,6 @@ class Driver: start_command=cmd, name=name, keep_vm_state=args.get("keep_vm_state", False), allow_reboot=args.get("allow_reboot", False), ) def serial_stdout_on(self) -> None: Loading nixos/lib/test-driver/test_driver/machine.py +3 −6 Original line number Diff line number Diff line Loading @@ -311,7 +311,6 @@ class Machine: start_command: StartCommand keep_vm_state: bool allow_reboot: bool process: Optional[subprocess.Popen] pid: Optional[int] Loading @@ -336,13 +335,11 @@ class Machine: start_command: StartCommand, name: str = "machine", keep_vm_state: bool = False, allow_reboot: bool = False, callbacks: Optional[List[Callable]] = None, ) -> None: self.out_dir = out_dir self.tmp_dir = tmp_dir self.keep_vm_state = keep_vm_state self.allow_reboot = allow_reboot self.name = name self.start_command = start_command self.callbacks = callbacks if callbacks is not None else [] Loading Loading @@ -873,7 +870,7 @@ class Machine: self.process.stdin.write(chars.encode()) self.process.stdin.flush() def start(self) -> None: def start(self, allow_reboot: bool = False) -> None: if self.booted: return Loading @@ -897,7 +894,7 @@ class Machine: self.shared_dir, self.monitor_path, self.shell_path, self.allow_reboot, allow_reboot, ) self.monitor, _ = monitor_socket.accept() self.shell, _ = shell_socket.accept() Loading Loading @@ -950,7 +947,7 @@ class Machine: """Press Ctrl+Alt+Delete in the guest. Prepares the machine to be reconnected which is useful if the machine was started after setting `machine.allow_reboot = True` machine was started with `allow_reboot = True` """ self.send_key(f"ctrl-alt-delete") self.connected = False Loading nixos/tests/login.nix +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }: }; testScript = '' machine.allow_reboot = True machine.start(allow_reboot = True) machine.wait_for_unit("multi-user.target") machine.wait_until_succeeds("pgrep -f 'agetty.*tty1'") Loading Loading
nixos/lib/test-driver/test_driver/driver.py +0 −1 Original line number Diff line number Diff line Loading @@ -179,7 +179,6 @@ class Driver: start_command=cmd, name=name, keep_vm_state=args.get("keep_vm_state", False), allow_reboot=args.get("allow_reboot", False), ) def serial_stdout_on(self) -> None: Loading
nixos/lib/test-driver/test_driver/machine.py +3 −6 Original line number Diff line number Diff line Loading @@ -311,7 +311,6 @@ class Machine: start_command: StartCommand keep_vm_state: bool allow_reboot: bool process: Optional[subprocess.Popen] pid: Optional[int] Loading @@ -336,13 +335,11 @@ class Machine: start_command: StartCommand, name: str = "machine", keep_vm_state: bool = False, allow_reboot: bool = False, callbacks: Optional[List[Callable]] = None, ) -> None: self.out_dir = out_dir self.tmp_dir = tmp_dir self.keep_vm_state = keep_vm_state self.allow_reboot = allow_reboot self.name = name self.start_command = start_command self.callbacks = callbacks if callbacks is not None else [] Loading Loading @@ -873,7 +870,7 @@ class Machine: self.process.stdin.write(chars.encode()) self.process.stdin.flush() def start(self) -> None: def start(self, allow_reboot: bool = False) -> None: if self.booted: return Loading @@ -897,7 +894,7 @@ class Machine: self.shared_dir, self.monitor_path, self.shell_path, self.allow_reboot, allow_reboot, ) self.monitor, _ = monitor_socket.accept() self.shell, _ = shell_socket.accept() Loading Loading @@ -950,7 +947,7 @@ class Machine: """Press Ctrl+Alt+Delete in the guest. Prepares the machine to be reconnected which is useful if the machine was started after setting `machine.allow_reboot = True` machine was started with `allow_reboot = True` """ self.send_key(f"ctrl-alt-delete") self.connected = False Loading
nixos/tests/login.nix +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }: }; testScript = '' machine.allow_reboot = True machine.start(allow_reboot = True) machine.wait_for_unit("multi-user.target") machine.wait_until_succeeds("pgrep -f 'agetty.*tty1'") Loading