From 5fbd643b1ac925a2b11a6a0af5d444200e2e6204 Mon Sep 17 00:00:00 2001 From: Katarzyna Treder Date: Wed, 26 Feb 2025 13:13:30 +0100 Subject: [PATCH] Move tests data path to TF Signed-off-by: Katarzyna Treder --- test/functional/test-framework | 2 +- test/functional/tests/conftest.py | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/test/functional/test-framework b/test/functional/test-framework index f7f2914e4..d7fb6885b 160000 --- a/test/functional/test-framework +++ b/test/functional/test-framework @@ -1 +1 @@ -Subproject commit f7f2914e41ce73d13dafe6cd749aa6e2d33b4315 +Subproject commit d7fb6885bfbb508aad3b50118a444ee0d160ac38 diff --git a/test/functional/tests/conftest.py b/test/functional/tests/conftest.py index 4460d6c3a..7a9d89339 100644 --- a/test/functional/tests/conftest.py +++ b/test/functional/tests/conftest.py @@ -37,9 +37,6 @@ from storage_devices.drbd import Drbd -TEST_RUN_DATA_PATH = "/tmp/open_cas_test_data" - - def pytest_addoption(parser): TestRun.addoption(parser) parser.addoption("--dut-config", action="append", type=str) @@ -136,7 +133,6 @@ def pytest_runtest_setup(item): TestRun.LOGGER.info(f"DUT info: {TestRun.dut}") TestRun.dut.plugin_manager = TestRun.plugin_manager TestRun.dut.executor = TestRun.executor - TestRun.TEST_RUN_DATA_PATH = TEST_RUN_DATA_PATH TestRun.dut.cache_list = [] TestRun.dut.core_list = [] TestRun.duts.append(TestRun.dut) @@ -192,14 +188,14 @@ def base_prepare(item): RamDisk.remove_all() - if check_if_directory_exists(path=TEST_RUN_DATA_PATH): + if check_if_directory_exists(path=TestRun.TEST_RUN_DATA_PATH): remove( - path=posixpath.join(TEST_RUN_DATA_PATH, "*"), + path=posixpath.join(TestRun.TEST_RUN_DATA_PATH, "*"), force=True, recursive=True, ) else: - create_directory(path=TEST_RUN_DATA_PATH) + create_directory(path=TestRun.TEST_RUN_DATA_PATH) for disk in TestRun.disks.values(): disk_serial = Disk.get_disk_serial_number(disk.path) @@ -268,9 +264,9 @@ def pytest_runtest_teardown(): DeviceMapper.remove_all() RamDisk.remove_all() - if check_if_directory_exists(path=TEST_RUN_DATA_PATH): + if check_if_directory_exists(path=TestRun.TEST_RUN_DATA_PATH): remove( - path=posixpath.join(TEST_RUN_DATA_PATH, "*"), + path=posixpath.join(TestRun.TEST_RUN_DATA_PATH, "*"), force=True, recursive=True, )