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

View File

@@ -199,12 +199,13 @@ class Log(HtmlLogManager, metaclass=Singleton):
TestRun.executor.run(f"dmesg > {log_files['dmesg.log']}") 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(): for log_name, log_source_path in log_files.items():
try: try:
log_destination_path = os.path.join( 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: except Exception as e:
TestRun.LOGGER.warning( TestRun.LOGGER.warning(
f"There was a problem during gathering {log_name} log.\n{str(e)}" f"There was a problem during gathering {log_name} log.\n{str(e)}"