Jan Kundrát | d012b32 | 2024-01-12 18:37:05 +0100 | [diff] [blame] | 1 | foreach(var THIS_BINARY_DIR TEST_NAME SYSREPO_SHM_PREFIX) |
| 2 | if(NOT ${var}) |
| 3 | message(FATAL_ERROR "${var} not specified") |
| 4 | endif() |
| 5 | endforeach() |
| 6 | |
| 7 | set(shm_files_pattern "/dev/shm/${SYSREPO_SHM_PREFIX}*") |
| 8 | file(GLOB shm_files ${shm_files_pattern}) |
| 9 | set(dummy_nonexisting_file_to_silence_warnings ${CMAKE_CURRENT_BUILD_DIR}/sysrepo-dummy-non-existing-file-for-cleanup) |
| 10 | |
| 11 | message(STATUS "Removing ${shm_files_pattern}") |
| 12 | file(REMOVE ${shm_files} ${dummy_nonexisting_file_to_silence_warnings}) |
| 13 | message(STATUS "Removing ${THIS_BINARY_DIR}/test_repositories/test_${TEST_NAME}") |
| 14 | file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/test_repositories/test_${TEST_NAME}") |