From 0cbd27ec2551abd8467d2f2f2954f61a944feb8f Mon Sep 17 00:00:00 2001 From: Andrew Vaillancourt Date: Thu, 9 Jan 2025 03:14:44 -0500 Subject: [PATCH] Fix log summary to include the full log dir path Previously, the log path displayed only the base directory (e.g., '/home//AUTOMATION_LOGS'). Now, it shows the full path, including dynamically derived details such as the lab name and timestamp (e.g., '/home//AUTOMATION_LOGS//'). The lab name is extracted from the configuration file (config/lab/files/default.json5), ensuring the log paths reflect the specific lab and execution context. Change-Id: I3aa0ed8431b3a94bb8c36b90bdad5aab336add7f Signed-off-by: Andrew Vaillancourt --- framework/runner/scripts/test_executor.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/framework/runner/scripts/test_executor.py b/framework/runner/scripts/test_executor.py index 31279dc7..62e8c06c 100644 --- a/framework/runner/scripts/test_executor.py +++ b/framework/runner/scripts/test_executor.py @@ -37,12 +37,17 @@ def execute_test(test: TestCase, test_executor_summary: TestExecutorSummary, tes def log_summary(test_executor_summary: TestExecutorSummary): """ - Logs the test summary + Logs the summary of test execution results and the path to the log directory. + + This function processes the test summary provided by `TestExecutorSummary`, logs each + line of the summary, and logs the location of the log directory. + Args: - test_executor_summary (): the summary object containing the results + test_executor_summary (TestExecutorSummary): The summary object containing the test + execution results. Returns: - + None """ get_logger().log_info("") get_logger().log_info("") @@ -50,7 +55,7 @@ def log_summary(test_executor_summary: TestExecutorSummary): for summary_line in test_executor_summary.get_tests_summary(): get_logger().log_info(summary_line) get_logger().log_info("") - get_logger().log_info(f"Logs Path: {ConfigurationManager.get_logger_config().get_log_location()}") + get_logger().log_info(f"Logs Path: {get_logger().get_log_folder()}") def main():