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