nixos/test-driver: use function instead of var
Use a proper function to enable serial log printing instead of setting class member variables directly.
This commit is contained in:
@@ -249,10 +249,10 @@ class Driver:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def serial_stdout_on(self) -> None:
|
def serial_stdout_on(self) -> None:
|
||||||
rootlog._print_serial_logs = True
|
rootlog.print_serial_logs(True)
|
||||||
|
|
||||||
def serial_stdout_off(self) -> None:
|
def serial_stdout_off(self) -> None:
|
||||||
rootlog._print_serial_logs = False
|
rootlog.print_serial_logs(False)
|
||||||
|
|
||||||
def check_polling_conditions(self) -> None:
|
def check_polling_conditions(self) -> None:
|
||||||
for condition in self.polling_conditions:
|
for condition in self.polling_conditions:
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ class Logger:
|
|||||||
|
|
||||||
self._print_serial_logs = True
|
self._print_serial_logs = True
|
||||||
|
|
||||||
|
def print_serial_logs(self, enable: bool) -> None:
|
||||||
|
self._print_serial_logs = enable
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _eprint(*args: object, **kwargs: Any) -> None:
|
def _eprint(*args: object, **kwargs: Any) -> None:
|
||||||
print(*args, file=sys.stderr, **kwargs)
|
print(*args, file=sys.stderr, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user