diff --git a/slsDetectorSoftware/tests/test-SharedMemory.cpp b/slsDetectorSoftware/tests/test-SharedMemory.cpp index f9b7ce16f..4d389df1f 100644 --- a/slsDetectorSoftware/tests/test-SharedMemory.cpp +++ b/slsDetectorSoftware/tests/test-SharedMemory.cpp @@ -38,9 +38,14 @@ void freeShm(const int dindex, const int mIndex) { } constexpr int shm_id = 10; + +#ifndef __APPLE__ + +const char *env_p = std::getenv(SHM_ENV_NAME); +std::string env_name = env_p ? ("_" + std::string(env_p)) : ""; const std::string file_path = std::string("/dev/shm/slsDetectorPackage_detector_") + - std::to_string(shm_id); + std::to_string(shm_id) + env_name; TEST_CASE("Free obsolete (without isValid)", "[detector][shm]") { @@ -89,6 +94,8 @@ TEST_CASE("Free obsolete (without isValid)", "[detector][shm]") { } } +#endif + TEST_CASE("Create SharedMemory read and write", "[detector][shm]") { SharedMemory shm(shm_id, -1); if (shm.exists()) {