mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-11-18 17:24:04 +01:00
fixed shared memory test
This commit is contained in:
1 parent
6660501a3f
commit
e6d4d4ea95
1 file changed
+8
-1
@@ -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<Data> shm(shm_id, -1);
|
||||
if (shm.exists()) {
|
||||
|
||||
Reference in new issue
Block a user