rdkcentral / python_raft

RAFT is a Python based testing framework for writing engineering tests. It provides a modular, config driven, low level testing framework
Apache License 2.0
3 stars 0 forks source link

Serial Logging in separate thread #20

Open barbourshop opened 6 months ago

barbourshop commented 6 months ago

Goal: To have all serial logged to a separate file while tests are running

The problem:

Currently, serial output is only logged to the serial.log file when the serial module's read and write functions are called. This means all the output in-between serial actions is lost. This information could be useful in debugging issues when tests show failures.

The solution:

Having the serial module spawn a separate thread for its logging when the test is started (and serial is listed in the config). All output read through the serial console should be written into the serial.log file. With the serial module being updated to have all its read methods read from the serial.log file instead of actually reading from the serial console directly.

Bonus task:

Add timestamps to the serial output as it's logged into the serial.log file.

Acceptance Criteria:

Ulrond commented 1 day ago

we should have a class that supports logging, no matter what console class it is... Therefore any class can support logging