Unverified Commit cc3d409a authored by Maximilian Bosch's avatar Maximilian Bosch
Browse files

nixos/test-driver: log associated machine for `self.nested`

When doing `machine.succeed(...)` or something similar, it's now clear
that the command `...` was issued on `machine`.

Essentially, this results in the following diff in the log:

    -(finished: waiting for unit default.target, in 13.47 seconds)
    +machine: (finished: waiting for unit default.target, in 13.47 seconds)
    (finished: subtest: foobar text lorem ipsum, in 13.47 seconds)
parent 11ff96a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ class TerminalLogger(AbstractLogger):
        tic = time.time()
        yield
        toc = time.time()
        self.log(f"(finished: {message}, in {toc - tic:.2f} seconds)")
        self.log(f"(finished: {message}, in {toc - tic:.2f} seconds)", attributes)

    def info(self, *args, **kwargs) -> None:  # type: ignore
        self.log(*args, **kwargs)