mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
fixed bug found by @AliceMazzoleni99 that for ctb server is still shown in pgrep -f if xilinx server running, so now the pid is killed and looking for any DetectorServer_virtual instead. also reset color coding after Log
This commit is contained in:
@ -53,7 +53,7 @@ TEST_CASE("eiger_acquire_check_file_size", "[.cmdcall]") {
|
||||
det.setDynamicRange(16);
|
||||
|
||||
// acquire
|
||||
test_acquire_with_receiver(caller, std::chrono::seconds{2});
|
||||
test_acquire_with_receiver(caller, det);
|
||||
|
||||
// check frames caught
|
||||
test_frames_caught(det, num_frames_to_acquire);
|
||||
|
@ -130,10 +130,21 @@ void test_frames_caught(const Detector &det, int num_frames_to_acquire) {
|
||||
REQUIRE(frames_caught == num_frames_to_acquire);
|
||||
}
|
||||
|
||||
void test_acquire_with_receiver(Caller &caller, std::chrono::seconds timeout) {
|
||||
void test_acquire_with_receiver(Caller &caller, const Detector &det) {
|
||||
REQUIRE_NOTHROW(caller.call("rx_start", {}, -1, PUT));
|
||||
REQUIRE_NOTHROW(caller.call("start", {}, -1, PUT));
|
||||
std::this_thread::sleep_for(timeout);
|
||||
bool idle = false;
|
||||
while (!idle) {
|
||||
std::ostringstream oss;
|
||||
REQUIRE_NOTHROW(caller.call("status", {}, -1, GET));
|
||||
auto statusList = det.getDetectorStatus();
|
||||
if (statusList.any(defs::ERROR)) {
|
||||
throw std::runtime_error("error status while acquiring");
|
||||
}
|
||||
if (statusList.contains_only(defs::IDLE, defs::STOPPED)) {
|
||||
idle = true;
|
||||
}
|
||||
}
|
||||
REQUIRE_NOTHROW(caller.call("rx_stop", {}, -1, PUT));
|
||||
}
|
||||
|
||||
@ -285,8 +296,7 @@ void test_ctb_acquire_with_receiver(const testCtbAcquireInfo &test_info,
|
||||
set_ctb_config_state(det, test_info);
|
||||
|
||||
// acquire
|
||||
REQUIRE_NOTHROW(
|
||||
test_acquire_with_receiver(caller, std::chrono::seconds{2}));
|
||||
REQUIRE_NOTHROW(test_acquire_with_receiver(caller, det));
|
||||
|
||||
// check frames caught
|
||||
REQUIRE_NOTHROW(test_frames_caught(det, num_frames_to_acquire));
|
||||
|
@ -58,7 +58,7 @@ void test_acquire_binary_file_size(const testFileInfo &file_info,
|
||||
|
||||
void test_frames_caught(const Detector &det, int num_frames_to_acquire);
|
||||
|
||||
void test_acquire_with_receiver(Caller &caller, std::chrono::seconds timeout);
|
||||
void test_acquire_with_receiver(Caller &caller, const Detector &det);
|
||||
|
||||
testCommonDetAcquireInfo get_common_acquire_config_state(const Detector &det);
|
||||
void set_common_acquire_config_state(
|
||||
|
@ -54,7 +54,7 @@ TEST_CASE("gotthard2_acquire_check_file_size", "[.cmdcall]") {
|
||||
det.setBurstPeriod(std::chrono::milliseconds{0});
|
||||
|
||||
// acquire
|
||||
test_acquire_with_receiver(caller, std::chrono::seconds{2});
|
||||
test_acquire_with_receiver(caller, det);
|
||||
|
||||
// check frames caught
|
||||
test_frames_caught(det, num_frames_to_acquire);
|
||||
|
@ -48,7 +48,7 @@ TEST_CASE("jungfrau_acquire_check_file_size", "[.cmdcall]") {
|
||||
det.setReadNRows(512);
|
||||
|
||||
// acquire
|
||||
test_acquire_with_receiver(caller, std::chrono::seconds{2});
|
||||
test_acquire_with_receiver(caller, det);
|
||||
|
||||
// check frames caught
|
||||
test_frames_caught(det, num_frames_to_acquire);
|
||||
|
@ -48,7 +48,7 @@ TEST_CASE("moench_acquire_check_file_size", "[.cmdcall]") {
|
||||
det.setReadNRows(400);
|
||||
|
||||
// acquire
|
||||
test_acquire_with_receiver(caller, std::chrono::seconds{2});
|
||||
test_acquire_with_receiver(caller, det);
|
||||
|
||||
// check frames caught
|
||||
test_frames_caught(det, num_frames_to_acquire);
|
||||
|
@ -55,7 +55,7 @@ TEST_CASE("mythen3_acquire_check_file_size", "[.cmdcall]") {
|
||||
det.setCounterMask(test_counter_mask);
|
||||
|
||||
// acquire
|
||||
test_acquire_with_receiver(caller, std::chrono::seconds{2});
|
||||
test_acquire_with_receiver(caller, det);
|
||||
|
||||
// check frames caught
|
||||
test_frames_caught(det, num_frames_to_acquire);
|
||||
|
Reference in New Issue
Block a user