Merge pull request #96571 from aszlig/nixos-tests-sleep-guest-time

nixos/test-driver: Use guest time when using sleep
This commit is contained in:
Florian Klink 2020-08-29 17:09:35 +02:00 committed by GitHub
commit c376f3ec11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -773,7 +773,8 @@ class Machine:
retry(window_is_visible) retry(window_is_visible)
def sleep(self, secs: int) -> None: def sleep(self, secs: int) -> None:
time.sleep(secs) # We want to sleep in *guest* time, not *host* time.
self.succeed(f"sleep {secs}")
def forward_port(self, host_port: int = 8080, guest_port: int = 80) -> None: def forward_port(self, host_port: int = 8080, guest_port: int = 80) -> None:
"""Forward a TCP port on the host to a TCP port on the guest. """Forward a TCP port on the host to a TCP port on the guest.