From 95d8ba2edda1602cc767cb7eca626c51142b4bfa Mon Sep 17 00:00:00 2001 From: Anton Myagkov Date: Thu, 10 Oct 2024 10:24:00 +0200 Subject: [PATCH] test: move dmesg log to test directory (#2249) Move dmesg log to the test folder to avoid loosing logs after running the next test from the suite. --- cloud/blockstore/tests/python/lib/loadtest_env.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cloud/blockstore/tests/python/lib/loadtest_env.py b/cloud/blockstore/tests/python/lib/loadtest_env.py index 2b0c8d74d68..75f1fe6b29b 100644 --- a/cloud/blockstore/tests/python/lib/loadtest_env.py +++ b/cloud/blockstore/tests/python/lib/loadtest_env.py @@ -1,5 +1,6 @@ from contrib.ydb.tests.library.harness.kikimr_config import KikimrConfigGenerator from contrib.ydb.tests.library.harness.kikimr_cluster import kikimr_cluster_factory +from contrib.ydb.tests.library.harness.kikimr_runner import get_unique_path_for_current_test from contrib.ydb.tests.library.harness.util import LogLevels from cloud.blockstore.config.storage_pb2 import TStorageServiceConfig @@ -162,7 +163,10 @@ def tear_down(self): finally: # It may be beneficial to save dmesg output for debugging purposes. try: - with open(yatest_common.output_path() + "/dmesg.txt", "w") as dmesg_output: + test_output_path = get_unique_path_for_current_test( + output_path=yatest_common.output_path(), + sub_folder="") + with open(test_output_path + "/dmesg.txt", "w") as dmesg_output: subprocess.run( ["sudo", "-n", "dmesg", "-T"], stdout=dmesg_output,