summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/integration_tests/conftest.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/integration_tests/conftest.py b/tests/integration_tests/conftest.py
index 5a543e39..68b92e4b 100644
--- a/tests/integration_tests/conftest.py
+++ b/tests/integration_tests/conftest.py
@@ -190,6 +190,15 @@ def _collect_logs(instance: IntegrationInstance, node_id: str,
integration_settings.LOCAL_LOG_PATH
) / session_start_time / node_id_path
log.info("Writing logs to %s", log_dir)
+
+ # Add a symlink to the latest log output directory
+ last_symlink = Path(integration_settings.LOCAL_LOG_PATH) / 'last'
+ if os.path.islink(last_symlink):
+ os.unlink(last_symlink)
+ os.symlink(
+ Path(integration_settings.LOCAL_LOG_PATH) / session_start_time,
+ last_symlink)
+
if not log_dir.exists():
log_dir.mkdir(parents=True)
tarball_path = log_dir / 'cloud-init.tar.gz'