|
37 | 37 | from storage_devices.drbd import Drbd
|
38 | 38 |
|
39 | 39 |
|
40 |
| -TEST_RUN_DATA_PATH = "/tmp/open_cas_test_data" |
41 |
| - |
42 |
| - |
43 | 40 | def pytest_addoption(parser):
|
44 | 41 | TestRun.addoption(parser)
|
45 | 42 | parser.addoption("--dut-config", action="append", type=str)
|
@@ -136,7 +133,6 @@ def pytest_runtest_setup(item):
|
136 | 133 | TestRun.LOGGER.info(f"DUT info: {TestRun.dut}")
|
137 | 134 | TestRun.dut.plugin_manager = TestRun.plugin_manager
|
138 | 135 | TestRun.dut.executor = TestRun.executor
|
139 |
| - TestRun.TEST_RUN_DATA_PATH = TEST_RUN_DATA_PATH |
140 | 136 | TestRun.dut.cache_list = []
|
141 | 137 | TestRun.dut.core_list = []
|
142 | 138 | TestRun.duts.append(TestRun.dut)
|
@@ -192,14 +188,14 @@ def base_prepare(item):
|
192 | 188 |
|
193 | 189 | RamDisk.remove_all()
|
194 | 190 |
|
195 |
| - if check_if_directory_exists(path=TEST_RUN_DATA_PATH): |
| 191 | + if check_if_directory_exists(path=TestRun.TEST_RUN_DATA_PATH): |
196 | 192 | remove(
|
197 |
| - path=posixpath.join(TEST_RUN_DATA_PATH, "*"), |
| 193 | + path=posixpath.join(TestRun.TEST_RUN_DATA_PATH, "*"), |
198 | 194 | force=True,
|
199 | 195 | recursive=True,
|
200 | 196 | )
|
201 | 197 | else:
|
202 |
| - create_directory(path=TEST_RUN_DATA_PATH) |
| 198 | + create_directory(path=TestRun.TEST_RUN_DATA_PATH) |
203 | 199 |
|
204 | 200 | for disk in TestRun.disks.values():
|
205 | 201 | disk_serial = Disk.get_disk_serial_number(disk.path)
|
@@ -268,9 +264,9 @@ def pytest_runtest_teardown():
|
268 | 264 | DeviceMapper.remove_all()
|
269 | 265 | RamDisk.remove_all()
|
270 | 266 |
|
271 |
| - if check_if_directory_exists(path=TEST_RUN_DATA_PATH): |
| 267 | + if check_if_directory_exists(path=TestRun.TEST_RUN_DATA_PATH): |
272 | 268 | remove(
|
273 |
| - path=posixpath.join(TEST_RUN_DATA_PATH, "*"), |
| 269 | + path=posixpath.join(TestRun.TEST_RUN_DATA_PATH, "*"), |
274 | 270 | force=True,
|
275 | 271 | recursive=True,
|
276 | 272 | )
|
|
0 commit comments