Merge pull request #30 from Deixx/fix-logs

Fix log gathering
This commit is contained in:
Katarzyna Treder 2024-11-25 09:53:58 +01:00 committed by GitHub
commit 5a16cd1f51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -199,12 +199,13 @@ class Log(HtmlLogManager, metaclass=Singleton):
TestRun.executor.run(f"dmesg > {log_files['dmesg.log']}")
dut_identifier = TestRun.dut.ip if TestRun.dut.ip else TestRun.dut.config["host"]
for log_name, log_source_path in log_files.items():
try:
log_destination_path = os.path.join(
self.base_dir, f"dut_info", TestRun.dut.ip, log_name
self.base_dir, "dut_info", dut_identifier, log_name
)
TestRun.executor.rsync_from(log_source_path, log_destination_path)
TestRun.executor.copy_from(log_source_path, log_destination_path)
except Exception as e:
TestRun.LOGGER.warning(
f"There was a problem during gathering {log_name} log.\n{str(e)}"