From 39b98776bb561199072842b35af2d5edf4670e96 Mon Sep 17 00:00:00 2001 From: Bartosz Oleaczek Date: Thu, 12 Dec 2024 15:26:22 +0100 Subject: [PATCH] fix hardcoded path --- test/qa/test_connect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/qa/test_connect.py b/test/qa/test_connect.py index bbc9c0c1..c900a20d 100644 --- a/test/qa/test_connect.py +++ b/test/qa/test_connect.py @@ -7,6 +7,7 @@ import lib from lib import daemon, info, logging, login, network, server +import os CONNECT_ALIAS = [ "connect", @@ -24,8 +25,9 @@ def teardown_function(function): # noqa: ARG001 logging.log() kernel_logs = sh.sudo.dmesg() + project_root = os.environ["WORKDIR"] # Write the logs to the output file - with open("/opt/dist/logs/dmesg.log", "w") as file: + with open(f"{project_root}/dist/logs/dmesg.log", "w") as file: file.write("dmesg logs") file.write(str(kernel_logs))