Skip to content

Commit

Permalink
test: move dmesg log to test directory (#2249)
Browse files Browse the repository at this point in the history
Move dmesg log to the test folder to avoid loosing logs after running the next test from the suite.
  • Loading branch information
antonmyagkov authored Oct 10, 2024
1 parent 7ddf520 commit 95d8ba2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cloud/blockstore/tests/python/lib/loadtest_env.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 95d8ba2

Please sign in to comment.