mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-08-06 03:32:25 +02:00
rm unnecessary hidden test tags (#1415)
* removed hidden tags other than .detectorintegration and .disable_check_data_file * updated label, minor
This commit is contained in:
@@ -68,7 +68,7 @@ If you want to run them for a specific virtual detector or a specific test use t
|
||||
|
||||
.. code-block:: console
|
||||
cd build
|
||||
python bin/test_simulators.py --servers jungfrau --test "[.rx]"
|
||||
python bin/test_simulators.py --servers jungfrau --test "[dacs]"
|
||||
|
||||
You can exclude specific tests by adding the option ``~[<disable_test_name>]``. Again, we assume that this marker is added to the tests that you want to exclude.
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
target_sources(tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-SharedMemory.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-slsDetector.cpp
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Caller/test-Caller-rx.cpp
|
||||
|
||||
@@ -20,7 +20,7 @@ using test::PUT;
|
||||
// sysctl net.core.rmem_max=$((100*1024*1024))
|
||||
// sysctl net.core.rmem_default=$((100*1024*1024))
|
||||
TEST_CASE("jungfrau_or_moench_acquire_check_file_size",
|
||||
"[.detectorintegration][.cmdacquire][.disable_check_data_file]") {
|
||||
"[.detectorintegration][.disable_check_data_file]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
@@ -51,7 +51,7 @@ TEST_CASE("jungfrau_or_moench_acquire_check_file_size",
|
||||
}
|
||||
|
||||
TEST_CASE("eiger_acquire_check_file_size",
|
||||
"[.detectorintegration][.cmdacquire][.disable_check_data_file]") {
|
||||
"[.detectorintegration][.disable_check_data_file]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type =
|
||||
@@ -83,7 +83,7 @@ TEST_CASE("eiger_acquire_check_file_size",
|
||||
}
|
||||
|
||||
TEST_CASE("mythen3_acquire_check_file_size",
|
||||
"[.detectorintegration][.cmdacquire][.disable_check_data_file]") {
|
||||
"[.detectorintegration][.disable_check_data_file]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type =
|
||||
@@ -117,7 +117,7 @@ TEST_CASE("mythen3_acquire_check_file_size",
|
||||
}
|
||||
|
||||
TEST_CASE("gotthard2_acquire_check_file_size",
|
||||
"[.detectorintegration][.cmdacquire][.disable_check_data_file]") {
|
||||
"[.detectorintegration][.disable_check_data_file]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type =
|
||||
@@ -160,7 +160,7 @@ void test_ctb_file_size_with_acquire(Detector &det, Caller &caller,
|
||||
// sysctl net.core.rmem_max=$((100*1024*1024))
|
||||
// sysctl net.core.rmem_default=$((100*1024*1024))
|
||||
TEST_CASE("ctb_acquire_check_file_size",
|
||||
"[.detectorintegration][.cmdacquire][.disable_check_data_file]") {
|
||||
"[.detectorintegration][.disable_check_data_file]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type =
|
||||
|
||||
@@ -488,7 +488,7 @@ TEST_CASE("slowadcindex", "[.detectorintegration]") {
|
||||
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("dac", "[.detectorintegration][.dacs]") {
|
||||
TEST_CASE("dac", "[.detectorintegration][dacs]") {
|
||||
// dac 0 to dac 17
|
||||
|
||||
Detector det;
|
||||
|
||||
@@ -127,7 +127,7 @@ TEST_CASE("temp_fpgafr", "[.detectorintegration]") {
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back EIGER dacs",
|
||||
"[.detectorintegration][.dacs]") {
|
||||
"[.detectorintegration][dacs]") {
|
||||
// vsvp, vtr, vrf, vrs, vsvn, vtgstv, vcmp_ll, vcmp_lr, vcal, vcmp_rl,
|
||||
// rxb_rb, rxb_lb, vcmp_rr, vcp, vcn, vis, vthreshold
|
||||
Detector det;
|
||||
|
||||
@@ -107,7 +107,7 @@ TEST_CASE("timegotthard2", "[.detectorintegration]") {
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back GOTTHARD2 dacs",
|
||||
"[.detectorintegration][.dacs]") {
|
||||
"[.detectorintegration][dacs]") {
|
||||
// vref_h_adc, vb_comp_fe, vb_comp_adc, vcom_cds,
|
||||
// vref_restore, vb_opa_1st, vref_comp_fe, vcom_adc1,
|
||||
// vref_prech, vref_l_adc, vref_cds, vb_cs,
|
||||
@@ -216,7 +216,7 @@ TEST_CASE("Setting and reading back GOTTHARD2 dacs",
|
||||
|
||||
/* on chip dacs */
|
||||
|
||||
TEST_CASE("vchip_comp_fe", "[.detectorintegration][.onchipdacs]") {
|
||||
TEST_CASE("vchip_comp_fe", "[.detectorintegration][dacs]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -229,7 +229,7 @@ TEST_CASE("vchip_comp_fe", "[.detectorintegration][.onchipdacs]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_opa_1st", "[.detectorintegration][.onchipdacs]") {
|
||||
TEST_CASE("vchip_opa_1st", "[.detectorintegration][dacs]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -242,7 +242,7 @@ TEST_CASE("vchip_opa_1st", "[.detectorintegration][.onchipdacs]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_opa_fd", "[.detectorintegration][.onchipdacs]") {
|
||||
TEST_CASE("vchip_opa_fd", "[.detectorintegration][dacs]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -255,7 +255,7 @@ TEST_CASE("vchip_opa_fd", "[.detectorintegration][.onchipdacs]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_comp_adc", "[.detectorintegration][.onchipdacs]") {
|
||||
TEST_CASE("vchip_comp_adc", "[.detectorintegration][dacs]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -268,7 +268,7 @@ TEST_CASE("vchip_comp_adc", "[.detectorintegration][.onchipdacs]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_ref_comp_fe", "[.detectorintegration][.onchipdacs]") {
|
||||
TEST_CASE("vchip_ref_comp_fe", "[.detectorintegration][dacs]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -282,7 +282,7 @@ TEST_CASE("vchip_ref_comp_fe", "[.detectorintegration][.onchipdacs]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("vchip_cs", "[.detectorintegration][.onchipdacs]") {
|
||||
TEST_CASE("vchip_cs", "[.detectorintegration][dacs]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
@@ -18,7 +18,7 @@ using test::PUT;
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back Jungfrau dacs",
|
||||
"[.detectorintegration][.dacs]") {
|
||||
"[.detectorintegration][dacs]") {
|
||||
// vb_comp, vdd_prot, vin_com, vref_prech, vb_pixbuf, vb_ds, vref_ds,
|
||||
// vref_comp
|
||||
Detector det;
|
||||
|
||||
@@ -1032,9 +1032,8 @@ void open_hdf5_file(const std::string &file_path) {
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_CASE(
|
||||
"check_master_file_attributes",
|
||||
"[.detectorintegration][.cmdacquire][.cmdattr][.disable_check_data_file]") {
|
||||
TEST_CASE("check_master_file_attributes",
|
||||
"[.detectorintegration][.disable_check_data_file]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
|
||||
@@ -18,7 +18,7 @@ using test::PUT;
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back moench dacs",
|
||||
"[.detectorintegration][.dacs]") {
|
||||
"[.detectorintegration][dacs]") {
|
||||
// vbp_colbuf, vipre, vin_cm, vb_sda, vcasc_sfp, vout_cm, vipre_cds,
|
||||
// ibias_sfp
|
||||
Detector det;
|
||||
|
||||
@@ -20,7 +20,7 @@ using test::PUT;
|
||||
/* dacs */
|
||||
|
||||
TEST_CASE("Setting and reading back MYTHEN3 dacs",
|
||||
"[.detectorintegration][.dacs]") {
|
||||
"[.detectorintegration][dacs]") {
|
||||
// vcassh, vth2, vshaper, vshaperneg, vipre_out, vth3, vth1,
|
||||
// vicin, vcas, vpreamp, vpl, vipre, viinsh, vph, vtrim, vdcsh,
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace sls {
|
||||
using test::PUT;
|
||||
|
||||
TEST_CASE("Ctb and xilinx - cant put if receiver is not idle",
|
||||
"[.detectorintegration][.rx]") {
|
||||
"[.detectorintegration]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
@@ -61,7 +61,7 @@ TEST_CASE("Ctb and xilinx - cant put if receiver is not idle",
|
||||
}
|
||||
|
||||
TEST_CASE("adcenable - cant put if receiver is not idle",
|
||||
"[.detectorintegration][.rx]") {
|
||||
"[.detectorintegration]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
@@ -85,7 +85,7 @@ TEST_CASE("adcenable - cant put if receiver is not idle",
|
||||
}
|
||||
|
||||
TEST_CASE("bursts - cant put if receiver is not idle",
|
||||
"[.detectorintegration][.rx]") {
|
||||
"[.detectorintegration]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
@@ -108,7 +108,7 @@ TEST_CASE("bursts - cant put if receiver is not idle",
|
||||
}
|
||||
|
||||
TEST_CASE("counters - cant put if receiver is not idle",
|
||||
"[.detectorintegration][.rx]") {
|
||||
"[.detectorintegration]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
@@ -132,7 +132,7 @@ TEST_CASE("counters - cant put if receiver is not idle",
|
||||
}
|
||||
|
||||
TEST_CASE("numinterfaces - cant put if receiver is not idle",
|
||||
"[.detectorintegration][.rx]") {
|
||||
"[.detectorintegration]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
@@ -154,8 +154,7 @@ TEST_CASE("numinterfaces - cant put if receiver is not idle",
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("dr - cant put if receiver is not idle",
|
||||
"[.detectorintegration][.rx]") {
|
||||
TEST_CASE("dr - cant put if receiver is not idle", "[.detectorintegration]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
@@ -178,7 +177,7 @@ TEST_CASE("dr - cant put if receiver is not idle",
|
||||
}
|
||||
|
||||
TEST_CASE("tengiga - cant put if receiver is not idle",
|
||||
"[.detectorintegration][.rx]") {
|
||||
"[.detectorintegration]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
@@ -203,7 +202,7 @@ TEST_CASE("tengiga - cant put if receiver is not idle",
|
||||
}
|
||||
|
||||
TEST_CASE("general - cant put if receiver is not idle",
|
||||
"[.detectorintegration][.rx]") {
|
||||
"[.detectorintegration]") {
|
||||
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
|
||||
@@ -25,7 +25,7 @@ python/scripts/list_tested_cmd.py to check if all commands are covered
|
||||
|
||||
/* configuration */
|
||||
|
||||
TEST_CASE("rx_version", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_version", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
std::ostringstream oss;
|
||||
@@ -39,7 +39,7 @@ TEST_CASE("rx_version", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
|
||||
/* acquisition */
|
||||
TEST_CASE("rx_start", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_start", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
det.setFileWrite(false); // avoid writing or error on file creation
|
||||
@@ -57,7 +57,7 @@ TEST_CASE("rx_start", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_stop", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_stop", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
// PUT only command
|
||||
@@ -74,7 +74,7 @@ TEST_CASE("rx_stop", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_status", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_status", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
det.setFileWrite(false); // avoid writing or error on file creation
|
||||
@@ -92,7 +92,7 @@ TEST_CASE("rx_status", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_framescaught", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_framescaught", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
// This ensures 0 caught frames
|
||||
@@ -126,7 +126,7 @@ TEST_CASE("rx_framescaught", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_missingpackets", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_missingpackets", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getFileWrite();
|
||||
@@ -171,7 +171,7 @@ TEST_CASE("rx_missingpackets", "[.detectorintegration][.rx]") {
|
||||
det.setNumberOfFrames(prev_frames);
|
||||
}
|
||||
|
||||
TEST_CASE("rx_frameindex", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_frameindex", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
caller.call("rx_frameindex", {}, -1, GET);
|
||||
@@ -182,7 +182,7 @@ TEST_CASE("rx_frameindex", "[.detectorintegration][.rx]") {
|
||||
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
|
||||
TEST_CASE("rx_printconfig", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_printconfig", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
REQUIRE_NOTHROW(caller.call("rx_printconfig", {}, -1, GET));
|
||||
@@ -190,7 +190,7 @@ TEST_CASE("rx_printconfig", "[.detectorintegration][.rx]") {
|
||||
|
||||
/* Receiver Config */
|
||||
|
||||
TEST_CASE("rx_hostname", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_hostname", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxHostname();
|
||||
@@ -222,7 +222,7 @@ TEST_CASE("rx_hostname", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_tcpport", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_tcpport", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxPort();
|
||||
@@ -261,7 +261,7 @@ TEST_CASE("rx_tcpport", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_fifodepth", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_fifodepth", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxFifoDepth();
|
||||
@@ -285,7 +285,7 @@ TEST_CASE("rx_fifodepth", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_silent", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_silent", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxSilentMode();
|
||||
@@ -309,7 +309,7 @@ TEST_CASE("rx_silent", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_discardpolicy", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_discardpolicy", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxFrameDiscardPolicy();
|
||||
@@ -338,7 +338,7 @@ TEST_CASE("rx_discardpolicy", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_padding", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_padding", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getPartialFramesPadding();
|
||||
@@ -362,7 +362,7 @@ TEST_CASE("rx_padding", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_udpsocksize", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_udpsocksize", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash(
|
||||
@@ -382,7 +382,7 @@ TEST_CASE("rx_udpsocksize", "[.detectorintegration][.rx]") {
|
||||
det.setRxUDPSocketBufferSize(prev_val);
|
||||
}
|
||||
|
||||
TEST_CASE("rx_realudpsocksize", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_realudpsocksize", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
uint64_t val = 0;
|
||||
@@ -401,7 +401,7 @@ TEST_CASE("rx_realudpsocksize", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_lock", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_lock", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxLock();
|
||||
@@ -425,7 +425,7 @@ TEST_CASE("rx_lock", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_lastclient", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_lastclient", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
std::ostringstream oss;
|
||||
@@ -435,14 +435,14 @@ TEST_CASE("rx_lastclient", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_threads", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_threads", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
std::ostringstream oss;
|
||||
REQUIRE_NOTHROW(caller.call("rx_threads", {}, -1, GET, oss));
|
||||
}
|
||||
|
||||
TEST_CASE("rx_arping", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_arping", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxArping();
|
||||
@@ -970,7 +970,7 @@ TEST_CASE("foverwrite", "[.detectorintegration]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_framesperfile", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_framesperfile", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getFramesPerFile();
|
||||
@@ -1001,7 +1001,7 @@ TEST_CASE("rx_framesperfile", "[.detectorintegration][.rx]") {
|
||||
|
||||
/* ZMQ Streaming Parameters (Receiver<->Client) */
|
||||
|
||||
TEST_CASE("rx_zmqstream", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_zmqstream", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxZmqDataStream();
|
||||
@@ -1027,7 +1027,7 @@ TEST_CASE("rx_zmqstream", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_zmqfreq", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_zmqfreq", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxZmqFrequency();
|
||||
@@ -1051,7 +1051,7 @@ TEST_CASE("rx_zmqfreq", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_zmqstartfnum", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_zmqstartfnum", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getRxZmqStartingFrame();
|
||||
@@ -1075,7 +1075,7 @@ TEST_CASE("rx_zmqstartfnum", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_zmqport", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_zmqport", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val_zmqport = det.getRxZmqPort();
|
||||
@@ -1153,7 +1153,7 @@ TEST_CASE("rx_zmqhwm", "[.detectorintegration]") {
|
||||
|
||||
/* CTB Specific */
|
||||
|
||||
TEST_CASE("rx_dbitlist", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_dbitlist", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -1183,7 +1183,7 @@ TEST_CASE("rx_dbitlist", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_dbitoffset", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_dbitoffset", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -1218,7 +1218,7 @@ TEST_CASE("rx_dbitoffset", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_dbitreorder", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_dbitreorder", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -1249,7 +1249,7 @@ TEST_CASE("rx_dbitreorder", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_jsonaddheader", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_jsonaddheader", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getAdditionalJsonHeader();
|
||||
@@ -1275,7 +1275,7 @@ TEST_CASE("rx_jsonaddheader", "[.detectorintegration][.rx]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("rx_jsonpara", "[.detectorintegration][.rx]") {
|
||||
TEST_CASE("rx_jsonpara", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto prev_val = det.getAdditionalJsonHeader();
|
||||
|
||||
@@ -519,7 +519,7 @@ TEST_CASE("trimval", "[.detectorintegration]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("trimen", "[.detectorintegration][.this]") {
|
||||
TEST_CASE("trimen", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -839,7 +839,7 @@ TEST_CASE("triggers", "[.detectorintegration]") {
|
||||
det.setNumberOfTriggers(prev_val);
|
||||
}
|
||||
|
||||
TEST_CASE("exptime", "[.detectorintegration][.time]") {
|
||||
TEST_CASE("exptime", "[.detectorintegration]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -3292,7 +3292,7 @@ TEST_CASE("update", "[.detectorintegration]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("reg", "[.detectorintegration][.definecmds]") {
|
||||
TEST_CASE("reg", "[.detectorintegration][reg]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -3351,7 +3351,7 @@ TEST_CASE("adcreg", "[.detectorintegration]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("setbit", "[.detectorintegration][.definecmds]") {
|
||||
TEST_CASE("setbit", "[.detectorintegration][reg]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -3381,7 +3381,7 @@ TEST_CASE("setbit", "[.detectorintegration][.definecmds]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("clearbit", "[.detectorintegration][.definecmds]") {
|
||||
TEST_CASE("clearbit", "[.detectorintegration][reg]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
@@ -3411,7 +3411,7 @@ TEST_CASE("clearbit", "[.detectorintegration][.definecmds]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("getbit", "[.detectorintegration][.definecmds]") {
|
||||
TEST_CASE("getbit", "[.detectorintegration][reg]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
// #include "catch.hpp"
|
||||
// #include "sls/container_utils.h"
|
||||
// #include "slsDetector.h"
|
||||
// #include "sls/sls_detector_defs.h"
|
||||
// #include "sls/string_utils.h"
|
||||
// #include <algorithm>
|
||||
// #include <iostream>
|
||||
|
||||
// TEST_CASE("Set and get trimen", "[detector]") {
|
||||
// // Free shared memory to be sure that we start in a clean state
|
||||
// slsDetector::freeSharedMemory(20, 20);
|
||||
|
||||
// // Create a detector and check that the type is set correctly
|
||||
// slsDetector d(slsDetectorDefs::detectorType::EIGER, 20, 20);
|
||||
// CHECK(d.getDetectorTypeAsEnum() == slsDetectorDefs::detectorType::EIGER);
|
||||
|
||||
// // At the beginning there should be no trimen set
|
||||
// auto res = d.getTrimEn();
|
||||
// CHECK(res.empty());
|
||||
|
||||
// std::vector<int> energies{5200, 6400, 8500, 9900, 12000};
|
||||
// d.setTrimEn(energies);
|
||||
// auto res2 = d.getTrimEn();
|
||||
|
||||
// // Check that the size and every element matches what we set
|
||||
// CHECK(res2.size() == energies.size());
|
||||
// for (size_t i = 0; i != res2.size(); ++i)
|
||||
// CHECK(res2[i] == energies[i]);
|
||||
|
||||
// // Setting trimen with too many vales throws an exception and keeps the
|
||||
// // old values
|
||||
// std::vector<int> too_many(150, 1000);
|
||||
// CHECK_THROWS(d.setTrimEn(too_many));
|
||||
// auto res3 = d.getTrimEn();
|
||||
// CHECK(res3.size() == energies.size());
|
||||
// for (size_t i = 0; i != res3.size(); ++i)
|
||||
// CHECK(res3[i] == energies[i]);
|
||||
|
||||
// // Setting trimen without arguments resets to zero
|
||||
// d.setTrimEn();
|
||||
// CHECK(d.getTrimEn().empty());
|
||||
|
||||
// // Clean up before next test
|
||||
// d.freeSharedMemory();
|
||||
// }
|
||||
|
||||
// TEST_CASE("Set additional JSON header", "[detector]") {
|
||||
// slsDetector::freeSharedMemory(20, 20);
|
||||
// slsDetector d(slsDetectorDefs::detectorType::EIGER, 20, 20);
|
||||
// auto header = d.getAdditionalJsonHeader();
|
||||
// CHECK(header.empty());
|
||||
|
||||
// // The header set is not validated
|
||||
// d.setAdditionalJsonHeader("any header");
|
||||
// header = d.getAdditionalJsonHeader();
|
||||
// CHECK(header == "any header");
|
||||
|
||||
// // make sure reset works
|
||||
// d.setAdditionalJsonHeader("");
|
||||
// CHECK(d.getAdditionalJsonHeader().empty());
|
||||
|
||||
// // Setting and getting one parameter
|
||||
// d.setAdditionalJsonParameter("exptime", "5");
|
||||
// CHECK(d.getAdditionalJsonParameter("exptime") == "5");
|
||||
// CHECK(d.getAdditionalJsonHeader() == "\"exptime\":5");
|
||||
|
||||
// // Making sure setting another paramer does not mess up
|
||||
// // the first
|
||||
// d.setAdditionalJsonParameter("gain", "low");
|
||||
// CHECK(d.getAdditionalJsonParameter("exptime") == "5");
|
||||
// CHECK(d.getAdditionalJsonParameter("gain") == "low");
|
||||
// CHECK(d.getAdditionalJsonHeader() == "\"exptime\":5,\"gain\":\"low\"");
|
||||
|
||||
// // Change a value
|
||||
// d.setAdditionalJsonParameter("exptime", "90");
|
||||
// CHECK(d.getAdditionalJsonParameter("exptime") == "90");
|
||||
// CHECK(d.getAdditionalJsonHeader() == "\"exptime\":90,\"gain\":\"low\"");
|
||||
|
||||
// // Ask for a key that does not exists
|
||||
// // TODO!(Erik) Is an empty string the right return or should we throw
|
||||
// CHECK(d.getAdditionalJsonParameter("somerandomkey").empty());
|
||||
|
||||
// // Throws if value or key is empty
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("somekey", ""));
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("", "parameter"));
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("", ""));
|
||||
|
||||
// // Throws if key or value has illegal char
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("mykey,", "5"));
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("some:key", "9"));
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("some\"key", "1"));
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("key", "value:"));
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("key", "va,lue"));
|
||||
// CHECK_THROWS(d.setAdditionalJsonParameter("key", "va\"l\"ue"));
|
||||
|
||||
// d.freeSharedMemory();
|
||||
// }
|
||||
|
||||
// TEST_CASE("Set ROI", "[detector]") {
|
||||
// using ROI = slsDetectorDefs::ROI;
|
||||
|
||||
// slsDetector::freeSharedMemory(20,20);
|
||||
// slsDetector d(slsDetectorDefs::detectorType::EIGER, 20, 20);
|
||||
|
||||
// int n{0};
|
||||
// d.getROI(n);
|
||||
// CHECK(n == 0);
|
||||
// CHECK(d.getNRoi() == 0);
|
||||
|
||||
// // set one ROI
|
||||
// ROI r;
|
||||
// r.xmin = 5;
|
||||
// r.xmax = 100;
|
||||
// r.ymin = 10;
|
||||
// r.ymax = 300;
|
||||
// d.setROI(1, &r);
|
||||
|
||||
// auto res2 = d.getROI(n);
|
||||
// CHECK(n == 1);
|
||||
// CHECK(d.getNRoi() == 1);
|
||||
|
||||
// CHECK(res2->xmin == 5);
|
||||
// CHECK(res2->xmax == 100);
|
||||
// CHECK(res2->ymin == 10);
|
||||
// CHECK(res2->ymax == 300);
|
||||
|
||||
// d.freeSharedMemory();
|
||||
// }
|
||||
|
||||
// TEST_CASE("Set multiple ROIs", "[detector]") {
|
||||
// using ROI = slsDetectorDefs::ROI;
|
||||
|
||||
// slsDetector::freeSharedMemory(20, 20);
|
||||
// slsDetector d(slsDetectorDefs::detectorType::EIGER, 20, 20);
|
||||
|
||||
// // set one ROI
|
||||
// constexpr int n = 3;
|
||||
// ROI r[n];
|
||||
// r[0].xmin = 500;
|
||||
// r[0].xmax = 60000;
|
||||
// r[0].ymin = 100;
|
||||
// r[0].ymax = 800;
|
||||
|
||||
// r[1].xmin = 2;
|
||||
// r[1].xmax = 100;
|
||||
// r[1].ymin = 1;
|
||||
// r[1].ymax = 300;
|
||||
|
||||
// r[2].xmin = 200;
|
||||
// r[2].xmax = 300;
|
||||
// r[2].ymin = 15;
|
||||
// r[2].ymax = 307;
|
||||
// d.setROI(n, r);
|
||||
|
||||
// int n_roi{0};
|
||||
// auto res = d.getROI(n_roi);
|
||||
// CHECK(n_roi == n);
|
||||
// CHECK(d.getNRoi() == n);
|
||||
|
||||
// CHECK(res[0].xmin == 2);
|
||||
// CHECK(res[0].xmax == 100);
|
||||
// CHECK(res[0].ymin == 1);
|
||||
// CHECK(res[0].ymax == 300);
|
||||
|
||||
// CHECK(res[1].xmin == 200);
|
||||
// CHECK(res[1].xmax == 300);
|
||||
// CHECK(res[1].ymin == 15);
|
||||
// CHECK(res[1].ymax == 307);
|
||||
|
||||
// CHECK(res[2].xmin == 500);
|
||||
// CHECK(res[2].xmax == 60000);
|
||||
// CHECK(res[2].ymin == 100);
|
||||
// CHECK(res[2].ymax == 800);
|
||||
|
||||
// d.freeSharedMemory();
|
||||
// }
|
||||
|
||||
// TEST_CASE("Padding and discard policy", "[detector][new]"){
|
||||
// slsDetector::freeSharedMemory(20, 20);
|
||||
// slsDetector d(slsDetectorDefs::detectorType::EIGER, 20, 20);
|
||||
|
||||
// //
|
||||
// d.setPartialFramesPadding(false);
|
||||
// CHECK(d.getPartialFramesPadding() == false);
|
||||
// d.setPartialFramesPadding(true);
|
||||
// CHECK(d.getPartialFramesPadding() == true);
|
||||
|
||||
// d.freeSharedMemory();
|
||||
|
||||
// }
|
||||
|
||||
// TEST_CASE("create detParamets struct", "[detector][new]"){
|
||||
// detParameters par;
|
||||
// CHECK(sizeof(par) == 32);
|
||||
// CHECK(par.nChanX == 0);
|
||||
// CHECK(par.nChanY == 0);
|
||||
// CHECK(par.nChipX == 0);
|
||||
// CHECK(par.nChipY == 0);
|
||||
// CHECK(par.nDacs == 0);
|
||||
// CHECK(par.dynamicRange == 0);
|
||||
// CHECK(par.nGappixelsX == 0);
|
||||
// CHECK(par.nGappixelsY == 0);
|
||||
|
||||
// detParameters par2{slsDetectorDefs::detectorType::EIGER};
|
||||
// CHECK(sizeof(par2) == 32);
|
||||
// CHECK(par2.nChanX == 256);
|
||||
// CHECK(par2.nChanY == 256);
|
||||
// CHECK(par2.nChipX == 4);
|
||||
// CHECK(par2.nChipY == 1);
|
||||
// CHECK(par2.nDacs == 16);
|
||||
// CHECK(par2.dynamicRange == 16);
|
||||
// CHECK(par2.nGappixelsX == 6);
|
||||
// CHECK(par2.nGappixelsY == 1);
|
||||
// }
|
||||
|
||||
// TEST_CASE("ctb digital offset and list", "[detector][ctb]"){
|
||||
// slsDetector::freeSharedMemory(20, 20);
|
||||
// slsDetector d(slsDetectorDefs::detectorType::CHIPTESTBOARD, 20, 20);
|
||||
|
||||
// // dbit offset
|
||||
// CHECK(d.getReceiverDbitOffset() == 0);
|
||||
// CHECK(d.setReceiverDbitOffset(-1) == 0);
|
||||
// CHECK(d.setReceiverDbitOffset(0) == 0);
|
||||
// CHECK(d.setReceiverDbitOffset(5) == 5);
|
||||
// CHECK(d.getReceiverDbitOffset() == 5);
|
||||
|
||||
// // dbit list
|
||||
// std::vector <int> list = d.getReceiverDbitList();
|
||||
// CHECK(list.empty());
|
||||
|
||||
// for (int i = 0; i < 10; ++i)
|
||||
// list.push_back(i);
|
||||
// d.setReceiverDbitList(list);
|
||||
|
||||
// CHECK(d.getReceiverDbitList().size() == 10);
|
||||
|
||||
// list.push_back(64);
|
||||
// CHECK_THROWS_AS(d.setReceiverDbitList(list), RuntimeError);
|
||||
// CHECK_THROWS_WITH(d.setReceiverDbitList(list),
|
||||
// Catch::Matchers::Contains("be between 0 and 63"));
|
||||
|
||||
// list.clear();
|
||||
// for (int i = 0; i < 65; ++i)
|
||||
// list.push_back(i);
|
||||
// CHECK(list.size() == 65);
|
||||
// CHECK_THROWS_WITH(d.setReceiverDbitList(list),
|
||||
// Catch::Matchers::Contains("be greater than 64"));
|
||||
|
||||
// list.clear();
|
||||
// d.setReceiverDbitList(list);
|
||||
// CHECK(d.getReceiverDbitList().empty());
|
||||
|
||||
// }
|
||||
@@ -138,45 +138,27 @@ TEST_CASE("Parse version and help", "[detector]") {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: fails on gitea CI due to uid issue, fix later
|
||||
TEST_CASE("Parse port and uid", "[.failsongitea][detector]") {
|
||||
uid_t uid = getuid();
|
||||
std::string uidStr = std::to_string(uid);
|
||||
uid_t invalidUid = uid + 1000;
|
||||
std::string invalidUidStr = std::to_string(invalidUid);
|
||||
|
||||
TEST_CASE("Parse port", "[detector]") {
|
||||
for (auto app : {AppType::SingleReceiver, AppType::MultiReceiver,
|
||||
AppType::FrameSynchronizer}) {
|
||||
CommandLineOptions s(app);
|
||||
|
||||
// TODO! This test fails on gitea CI probably because the user can set the uid
|
||||
// commenting it out for now. Revisit later.
|
||||
// REQUIRE_THROWS(
|
||||
// TODO! This test fails on gitea CI probably because the user can set
|
||||
// the uid commenting it out for now. Revisit later. REQUIRE_THROWS(
|
||||
// s.parse({"", "-p", "1234", "-u", invalidUidStr})); // invalid uid
|
||||
|
||||
REQUIRE_THROWS(s.parse({"", "-p", "500"})); // invalid port
|
||||
REQUIRE_THROWS(s.parse({"", "-p", "500"})); // invalid port
|
||||
|
||||
auto opts = s.parse({"", "-p", "1234", "-u", uidStr});
|
||||
std::visit(
|
||||
[&](const auto &o) {
|
||||
REQUIRE(o.port == 1234);
|
||||
REQUIRE(o.userid == uid);
|
||||
},
|
||||
opts);
|
||||
auto opts = s.parse({"", "-p", "1234"});
|
||||
std::visit([&](const auto &o) { REQUIRE(o.port == 1234); }, opts);
|
||||
|
||||
opts = s.parse({"", "-p", "5678"});
|
||||
std::visit(
|
||||
[](const auto &o) {
|
||||
REQUIRE(o.port == 5678);
|
||||
REQUIRE(o.userid == static_cast<uid_t>(-1)); // default
|
||||
},
|
||||
opts);
|
||||
std::visit([](const auto &o) { REQUIRE(o.port == 5678); }, opts);
|
||||
|
||||
opts = s.parse({});
|
||||
std::visit(
|
||||
[](const auto &o) {
|
||||
REQUIRE(o.port == 1954); // default
|
||||
REQUIRE(o.userid == static_cast<uid_t>(-1)); // default
|
||||
REQUIRE(o.port == 1954); // default
|
||||
},
|
||||
opts);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace sls {
|
||||
|
||||
using dt = slsDetectorDefs::detectorType;
|
||||
|
||||
TEST_CASE("sls_detector_module default construction", "[support][new]") {
|
||||
TEST_CASE("sls_detector_module default construction", "[support]") {
|
||||
sls_detector_module m;
|
||||
CHECK(m.serialnumber == 0);
|
||||
CHECK(m.nchan == 0);
|
||||
|
||||
Reference in New Issue
Block a user