nixos/test-driver: Separate XML and Terminal log

We use the newly AbstractLogger class and separate the XML and Terminal
logging that is currently mixed into one class. We restore the old
behavior by introducing a CompositeLogger that takes care of logging
both to terminal and XML.
This commit is contained in:
Stefan Hertrampf 2024-04-08 16:17:06 +02:00
parent b505db6f6d
commit 9d90df51a9
2 changed files with 116 additions and 25 deletions

View file

@ -4,7 +4,7 @@
from test_driver.driver import Driver
from test_driver.vlan import VLan
from test_driver.machine import Machine
from test_driver.logger import Logger
from test_driver.logger import AbstractLogger
from typing import Callable, Iterator, ContextManager, Optional, List, Dict, Any, Union
from typing_extensions import Protocol
from pathlib import Path
@ -44,7 +44,7 @@ test_script: Callable[[], None]
machines: List[Machine]
vlans: List[VLan]
driver: Driver
log: Logger
log: AbstractLogger
create_machine: CreateMachineProtocol
run_tests: Callable[[], None]
join_all: Callable[[], None]