diff --git a/python/slsdet/utils.py b/python/slsdet/utils.py index 4648abd5a..9181298e5 100755 --- a/python/slsdet/utils.py +++ b/python/slsdet/utils.py @@ -281,6 +281,6 @@ def hostname_list(args): def validate_port(value): - if value <= 0 or value > 65535: - raise ValueError("port must be in range 1 - 65535") + if value < 1024 or value > 65535: + raise ValueError("port must be in range 1024 - 65535") diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 9ced2736e..3887403bc 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -1309,7 +1309,7 @@ Result Detector::getRxPort(Positions pos) const { void Detector::setRxPort(uint16_t port, int module_id) { if (module_id == -1) { - validatePortRange(port, size() - 1); + validatePortRange(port, size()); std::vector port_list(size()); std::iota(std::begin(port_list), std::end(port_list), port); @@ -2838,7 +2838,7 @@ std::vector Detector::getValidPortNumbers(uint16_t start_port) { int num_sockets_per_detector = getNumberofUDPInterfaces({}).tsquash( "Number of UDP Interfaces is not consistent among modules"); - validatePortRange(start_port, (size() - 1) * num_sockets_per_detector); + validatePortRange(start_port, size() * num_sockets_per_detector); std::vector res; res.reserve(size()); diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-acquire.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-acquire.cpp index 79fc509af..299125b99 100644 --- a/slsDetectorSoftware/tests/Caller/test-Caller-acquire.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-acquire.cpp @@ -139,6 +139,7 @@ void test_ctb_file_size_with_acquire(Detector &det, Caller &caller, int64_t num_frames, const testCtbAcquireInfo &test_info, bool isXilinxCtb) { + create_files_for_acquire(det, caller, num_frames, test_info); // check file size (assuming local pc) @@ -161,14 +162,14 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { int num_frames_to_acquire = 2; // all the test cases { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::ANALOG_AND_DIGITAL; REQUIRE_NOTHROW(test_ctb_file_size_with_acquire( det, caller, num_frames_to_acquire, test_ctb_config, isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::ANALOG_AND_DIGITAL; test_ctb_config.dbit_offset = 16; REQUIRE_NOTHROW(test_ctb_file_size_with_acquire( @@ -176,7 +177,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::ANALOG_AND_DIGITAL; test_ctb_config.dbit_reorder = true; REQUIRE_NOTHROW(test_ctb_file_size_with_acquire( @@ -184,7 +185,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::ANALOG_AND_DIGITAL; test_ctb_config.dbit_offset = 16; test_ctb_config.dbit_reorder = true; @@ -193,7 +194,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::ANALOG_AND_DIGITAL; test_ctb_config.dbit_offset = 16; test_ctb_config.dbit_list.clear(); @@ -202,7 +203,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::ANALOG_AND_DIGITAL; test_ctb_config.dbit_offset = 16; test_ctb_config.dbit_list.clear(); @@ -212,14 +213,14 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::DIGITAL_AND_TRANSCEIVER; REQUIRE_NOTHROW(test_ctb_file_size_with_acquire( det, caller, num_frames_to_acquire, test_ctb_config, isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::DIGITAL_AND_TRANSCEIVER; test_ctb_config.dbit_offset = 16; REQUIRE_NOTHROW(test_ctb_file_size_with_acquire( @@ -227,7 +228,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::DIGITAL_AND_TRANSCEIVER; test_ctb_config.dbit_list.clear(); REQUIRE_NOTHROW(test_ctb_file_size_with_acquire( @@ -235,7 +236,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::DIGITAL_AND_TRANSCEIVER; test_ctb_config.dbit_offset = 16; test_ctb_config.dbit_list.clear(); @@ -244,7 +245,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::DIGITAL_AND_TRANSCEIVER; test_ctb_config.dbit_offset = 16; test_ctb_config.dbit_list.clear(); @@ -254,7 +255,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::TRANSCEIVER_ONLY; test_ctb_config.dbit_offset = 16; test_ctb_config.dbit_list.clear(); @@ -264,7 +265,7 @@ TEST_CASE("ctb_acquire_check_file_size", "[.cmdcall][.cmdacquire]") { isXilinxCtb)); } { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; test_ctb_config.readout_mode = defs::ANALOG_ONLY; test_ctb_config.dbit_offset = 16; test_ctb_config.dbit_list.clear(); diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-chiptestboard.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-chiptestboard.cpp index fe30c9d2d..66ae42c1c 100644 --- a/slsDetectorSoftware/tests/Caller/test-Caller-chiptestboard.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-chiptestboard.cpp @@ -1000,7 +1000,7 @@ TEST_CASE("dbitclk", "[.cmdcall]") { auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { - auto prev_val = det.getRUNClock(); + auto prev_val = det.getDBITClock(); { std::ostringstream oss; caller.call("dbitclk", {"20"}, -1, PUT, oss); @@ -1017,7 +1017,7 @@ TEST_CASE("dbitclk", "[.cmdcall]") { REQUIRE(oss.str() == "dbitclk 10\n"); } for (int i = 0; i != det.size(); ++i) { - det.setRUNClock(prev_val[i], {i}); + det.setDBITClock(prev_val[i], {i}); } } else { // clock index might work diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-global.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-global.cpp index 2d89dd97c..4822a1e9c 100644 --- a/slsDetectorSoftware/tests/Caller/test-Caller-global.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-global.cpp @@ -149,8 +149,9 @@ void test_acquire_with_receiver(Caller &caller, const Detector &det) { REQUIRE_NOTHROW(caller.call("rx_stop", {}, -1, PUT)); } -void create_files_for_acquire(Detector &det, Caller &caller, int64_t num_frames, - std::optional test_info) { +void create_files_for_acquire( + Detector &det, Caller &caller, int64_t num_frames, + const std::optional &test_info) { // save previous state testFileInfo prev_file_info = get_file_state(det); @@ -248,7 +249,9 @@ std::pair calculate_ctb_image_size(const testCtbAcquireInfo &test_info, bool isXilinxCtb) { + // test_info.print(); // for debugging sls::CtbImageInputs inputs{}; + inputs.mode = test_info.readout_mode; inputs.nAnalogSamples = test_info.num_adc_samples; inputs.adcMask = test_info.adc_enable_10g; if (!isXilinxCtb && !test_info.ten_giga) { @@ -258,8 +261,8 @@ calculate_ctb_image_size(const testCtbAcquireInfo &test_info, inputs.transceiverMask = test_info.transceiver_mask; inputs.nDigitalSamples = test_info.num_dbit_samples; inputs.dbitOffset = test_info.dbit_offset; - inputs.dbitList = test_info.dbit_list; inputs.dbitReorder = test_info.dbit_reorder; + inputs.dbitList = test_info.dbit_list; auto out = computeCtbImageSize(inputs); uint64_t image_size = diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-global.h b/slsDetectorSoftware/tests/Caller/test-Caller-global.h index 34bdb948c..ee611484c 100644 --- a/slsDetectorSoftware/tests/Caller/test-Caller-global.h +++ b/slsDetectorSoftware/tests/Caller/test-Caller-global.h @@ -4,6 +4,8 @@ #include "Caller.h" #include "sls/Detector.h" +#include "sls/ToString.h" +#include "sls/logger.h" #include "sls/sls_detector_defs.h" #include @@ -41,6 +43,23 @@ struct testCtbAcquireInfo { std::vector dbit_list{0, 12, 2, 43}; bool dbit_reorder{false}; uint32_t transceiver_mask{0x3}; + + inline void print() const { + LOG(logINFO) << "CTB Acquire Info: " + << "\n\tReadout Mode: " << ToString(readout_mode) + << "\n\tTen Giga: " << ten_giga + << "\n\tADC Enable 1G: " << std::hex << adc_enable_1g + << std::dec << "\n\tADC Enable 10G: " << std::hex + << adc_enable_10g << std::dec + << "\n\tNumber of Analog Samples: " << num_adc_samples + << "\n\tNumber of Digital Samples: " << num_dbit_samples + << "\n\tNumber of Transceiver Samples: " + << num_trans_samples << "\n\tDBIT Offset: " << dbit_offset + << "\n\tDBIT Reorder: " << dbit_reorder + << "\n\tDBIT List: " << ToString(dbit_list) + << "\n\tTransceiver Mask: " << std::hex << transceiver_mask + << std::dec << std::endl; + } }; void test_valid_port_caller(const std::string &command, @@ -64,7 +83,7 @@ void test_acquire_with_receiver(Caller &caller, const Detector &det); void create_files_for_acquire( Detector &det, Caller &caller, int64_t num_frames = 1, - std::optional test_info = std::nullopt); + const std::optional &test_info = std::nullopt); testCtbAcquireInfo get_ctb_config_state(const Detector &det); void set_ctb_config_state(Detector &det, diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-master-attributes.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-master-attributes.cpp index be1ed74b0..bf4cf9bac 100644 --- a/slsDetectorSoftware/tests/Caller/test-Caller-master-attributes.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-master-attributes.cpp @@ -355,15 +355,15 @@ void test_master_file_version(const Detector &det, void test_master_file_type(const Detector &det, const std::optional &doc) { auto det_type = det.getDetectorType().tsquash("Inconsistent detector type"); - check_master_file( - doc, MasterAttributes::N_DETECTOR_TYPE.data(), ToString(det_type)); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_DETECTOR_TYPE.data(), ToString(det_type))); } void test_master_file_timing_mode(const Detector &det, const std::optional &doc) { auto timing_mode = det.getTimingMode().tsquash("Inconsistent timing mode"); - check_master_file(doc, MasterAttributes::N_TIMING_MODE.data(), - ToString(timing_mode)); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_TIMING_MODE.data(), ToString(timing_mode))); } void test_master_file_geometry(const Detector &det, @@ -372,8 +372,8 @@ void test_master_file_geometry(const Detector &det, auto portperModGeometry = det.getPortPerModuleGeometry(); auto geometry = defs::xy{modGeometry.x * portperModGeometry.x, modGeometry.y * portperModGeometry.y}; - check_master_file(doc, MasterAttributes::N_GEOMETRY.data(), - geometry); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_GEOMETRY.data(), geometry)); } void test_master_file_image_size(const Detector &det, @@ -415,7 +415,7 @@ void test_master_file_image_size(const Detector &det, case defs::CHIPTESTBOARD: case defs::XILINX_CHIPTESTBOARD: { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; image_size = calculate_ctb_image_size( test_info, (det_type == defs::XILINX_CHIPTESTBOARD)) .first; @@ -425,8 +425,8 @@ void test_master_file_image_size(const Detector &det, throw sls::RuntimeError("Unsupported detector type for this test"); } - check_master_file(doc, MasterAttributes::N_IMAGE_SIZE.data(), - image_size); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_IMAGE_SIZE.data(), image_size)); } void test_master_file_det_size(const Detector &det, @@ -446,15 +446,15 @@ void test_master_file_det_size(const Detector &det, portSize.x = nchan * num_counters; } else if (det_type == defs::CHIPTESTBOARD || det_type == defs::XILINX_CHIPTESTBOARD) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; portSize.x = calculate_ctb_image_size( test_info, det_type == defs::XILINX_CHIPTESTBOARD) .second; portSize.y = 1; } - check_master_file(doc, MasterAttributes::N_PIXELS.data(), - portSize); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_PIXELS.data(), portSize)); } void test_master_file_max_frames_per_file(const Detector &det, @@ -462,8 +462,9 @@ void test_master_file_max_frames_per_file(const Detector &det, auto max_frames_per_file = det.getFramesPerFile().tsquash("Inconsistent max frames per file"); - check_master_file(doc, MasterAttributes::N_MAX_FRAMES_PER_FILE.data(), - max_frames_per_file); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_MAX_FRAMES_PER_FILE.data(), + max_frames_per_file)); } void test_master_file_frame_discard_policy(const Detector &det, @@ -471,8 +472,9 @@ void test_master_file_frame_discard_policy(const Detector &det, auto policy = det.getRxFrameDiscardPolicy().tsquash( "Inconsistent frame discard policy"); - check_master_file( - doc, MasterAttributes::N_FRAME_DISCARD_POLICY.data(), ToString(policy)); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_FRAME_DISCARD_POLICY.data(), + ToString(policy))); } void test_master_file_frame_padding(const Detector &det, @@ -480,16 +482,16 @@ void test_master_file_frame_padding(const Detector &det, auto padding = static_cast( det.getPartialFramesPadding().tsquash("Inconsistent frame padding")); - check_master_file(doc, MasterAttributes::N_FRAME_PADDING.data(), - padding); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_FRAME_PADDING.data(), padding)); } void test_master_file_scan_parameters(const Detector &det, const std::optional &doc) { auto scan_params = det.getScan().tsquash("Inconsistent scan parameters"); - check_master_file( - doc, MasterAttributes::N_SCAN_PARAMETERS.data(), scan_params); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_SCAN_PARAMETERS.data(), scan_params)); } void test_master_file_total_frames(const Detector &det, @@ -535,8 +537,8 @@ void test_master_file_total_frames(const Detector &det, uint64_t total_frames = numFrames * repeats * (int64_t)(numAdditionalStorageCells + 1); - check_master_file(doc, MasterAttributes::N_TOTAL_FRAMES.data(), - total_frames); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_TOTAL_FRAMES.data(), total_frames)); } void test_master_file_rois(const Detector &det, @@ -566,24 +568,24 @@ void test_master_file_rois(const Detector &det, } } - check_master_file>( - doc, MasterAttributes::N_RECEIVER_ROIS.data(), rois); + REQUIRE_NOTHROW(check_master_file>( + doc, MasterAttributes::N_RECEIVER_ROIS.data(), rois)); } void test_master_file_exptime(const Detector &det, const std::optional &doc) { auto exptime = det.getExptime().tsquash("Inconsistent exposure time"); - check_master_file( - doc, MasterAttributes::N_EXPOSURE_TIME.data(), ToString(exptime)); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_EXPOSURE_TIME.data(), ToString(exptime))); } void test_master_file_period(const Detector &det, const std::optional &doc) { auto period = det.getPeriod().tsquash("Inconsistent period"); - check_master_file( - doc, MasterAttributes::N_ACQUISITION_PERIOD.data(), ToString(period)); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_ACQUISITION_PERIOD.data(), ToString(period))); } void test_master_file_num_udp_interfaces(const Detector &det, @@ -591,16 +593,17 @@ void test_master_file_num_udp_interfaces(const Detector &det, auto num_udp_interfaces = det.getNumberofUDPInterfaces().tsquash( "Inconsistent number of UDP interfaces"); - check_master_file(doc, MasterAttributes::N_NUM_UDP_INTERFACES.data(), - num_udp_interfaces); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_NUM_UDP_INTERFACES.data(), + num_udp_interfaces)); } void test_master_file_read_n_rows(const Detector &det, const std::optional &doc) { auto readnrows = det.getReadNRows().tsquash("Inconsistent number of rows"); - check_master_file(doc, MasterAttributes::N_NUMBER_OF_ROWS.data(), - readnrows); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_NUMBER_OF_ROWS.data(), readnrows)); } void test_master_file_readout_speed(const Detector &det, @@ -608,14 +611,15 @@ void test_master_file_readout_speed(const Detector &det, auto readout_speed = det.getReadoutSpeed().tsquash("Inconsistent readout speed"); - check_master_file( - doc, MasterAttributes::N_READOUT_SPEED.data(), ToString(readout_speed)); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_READOUT_SPEED.data(), + ToString(readout_speed))); } void test_master_file_frames_in_file(const std::optional &doc, const int frames_in_file) { - check_master_file(doc, MasterAttributes::N_FRAMES_IN_FILE.data(), - frames_in_file); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_FRAMES_IN_FILE.data(), frames_in_file)); } void test_master_file_json_header(const Detector &det, @@ -623,15 +627,16 @@ void test_master_file_json_header(const Detector &det, auto json_header = det.getAdditionalJsonHeader().tsquash("Inconsistent JSON header"); - check_master_file>( - doc, MasterAttributes::N_ADDITIONAL_JSON_HEADER.data(), json_header); + REQUIRE_NOTHROW(check_master_file>( + doc, MasterAttributes::N_ADDITIONAL_JSON_HEADER.data(), json_header)); } void test_master_file_dynamic_range(const Detector &det, const std::optional &doc) { auto dr = det.getDynamicRange().tsquash("Inconsistent dynamic range"); - check_master_file(doc, MasterAttributes::N_DYNAMIC_RANGE.data(), dr); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_DYNAMIC_RANGE.data(), dr)); } void test_master_file_ten_giga(const Detector &det, @@ -639,7 +644,8 @@ void test_master_file_ten_giga(const Detector &det, auto ten_giga = static_cast(det.getTenGiga().tsquash("Inconsistent ten giga")); - check_master_file(doc, MasterAttributes::N_TEN_GIGA.data(), ten_giga); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_TEN_GIGA.data(), ten_giga)); } void test_master_file_threshold_energy(const Detector &det, @@ -647,8 +653,8 @@ void test_master_file_threshold_energy(const Detector &det, auto threshold = det.getThresholdEnergy().tsquash("Inconsistent threshold energy"); - check_master_file(doc, MasterAttributes::N_THRESHOLD_ENERGY.data(), - threshold); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_THRESHOLD_ENERGY.data(), threshold)); } void test_master_file_sub_exptime(const Detector &det, @@ -656,9 +662,9 @@ void test_master_file_sub_exptime(const Detector &det, auto sub_exptime = det.getSubExptime().tsquash("Inconsistent sub exposure time"); - check_master_file(doc, - MasterAttributes::N_SUB_EXPOSURE_TIME.data(), - ToString(sub_exptime)); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_SUB_EXPOSURE_TIME.data(), + ToString(sub_exptime))); } void test_master_file_sub_period(const Detector &det, @@ -667,16 +673,17 @@ void test_master_file_sub_period(const Detector &det, auto deadtime = det.getSubDeadTime().tsquash("Inconsistent sub deadtime"); auto sub_period = exptime + deadtime; - check_master_file( + REQUIRE_NOTHROW(check_master_file( doc, MasterAttributes::N_SUB_ACQUISITION_PERIOD.data(), - ToString(sub_period)); + ToString(sub_period))); } void test_master_file_quad(const Detector &det, const std::optional &doc) { auto quad = static_cast(det.getQuad().tsquash("Inconsistent quad")); - check_master_file(doc, MasterAttributes::N_QUAD.data(), quad); + REQUIRE_NOTHROW( + check_master_file(doc, MasterAttributes::N_QUAD.data(), quad)); } void test_master_file_rate_corrections(const Detector &det, @@ -685,8 +692,8 @@ void test_master_file_rate_corrections(const Detector &det, for (auto item : det.getRateCorrection()) dead_times.push_back(item.count()); - check_master_file>( - doc, MasterAttributes::N_RATE_CORRECTIONS.data(), dead_times); + REQUIRE_NOTHROW(check_master_file>( + doc, MasterAttributes::N_RATE_CORRECTIONS.data(), dead_times)); } void test_master_file_counter_mask(const Detector &det, @@ -694,8 +701,8 @@ void test_master_file_counter_mask(const Detector &det, auto counter_mask = static_cast( det.getCounterMask().tsquash("Inconsistent counter mask")); - check_master_file(doc, MasterAttributes::N_COUNTER_MASK.data(), - counter_mask); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_COUNTER_MASK.data(), counter_mask)); } void test_master_file_exptimes(const Detector &det, @@ -703,8 +710,8 @@ void test_master_file_exptimes(const Detector &det, auto exptimes = det.getExptimeForAllGates().tsquash("Inconsistent exposure times"); - check_master_file>( - doc, MasterAttributes::N_EXPOSURE_TIMES.data(), exptimes); + REQUIRE_NOTHROW(check_master_file>( + doc, MasterAttributes::N_EXPOSURE_TIMES.data(), exptimes)); } void test_master_file_gate_delays(const Detector &det, @@ -712,15 +719,16 @@ void test_master_file_gate_delays(const Detector &det, auto gate_delays = det.getGateDelayForAllGates().tsquash("Inconsistent GateDelay"); - check_master_file>( - doc, MasterAttributes::N_GATE_DELAYS.data(), gate_delays); + REQUIRE_NOTHROW(check_master_file>( + doc, MasterAttributes::N_GATE_DELAYS.data(), gate_delays)); } void test_master_file_gates(const Detector &det, const std::optional &doc) { auto gates = det.getNumberOfGates().tsquash("Inconsistent number of gates"); - check_master_file(doc, MasterAttributes::N_GATES.data(), gates); + REQUIRE_NOTHROW( + check_master_file(doc, MasterAttributes::N_GATES.data(), gates)); } void test_master_file_threadhold_energies(const Detector &det, @@ -728,21 +736,22 @@ void test_master_file_threadhold_energies(const Detector &det, auto threshold_energies = det.getAllThresholdEnergy().tsquash("Inconsistent threshold energies"); - check_master_file>( - doc, MasterAttributes::N_THRESHOLD_ENERGIES.data(), threshold_energies); + REQUIRE_NOTHROW(check_master_file>( + doc, MasterAttributes::N_THRESHOLD_ENERGIES.data(), + threshold_energies)); } void test_master_file_burst_mode(const Detector &det, const std::optional &doc) { auto burst_mode = det.getBurstMode().tsquash("Inconsistent burst mode"); - check_master_file(doc, MasterAttributes::N_BURST_MODE.data(), - ToString(burst_mode)); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_BURST_MODE.data(), ToString(burst_mode))); } void test_master_file_adc_mask(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; auto adc_mask = test_ctb_config.adc_enable_10g; auto det_type = det.getDetectorType().squash(); if (det_type == defs::CHIPTESTBOARD) { @@ -751,104 +760,107 @@ void test_master_file_adc_mask(const Detector &det, adc_mask = test_ctb_config.adc_enable_1g; } - check_master_file(doc, MasterAttributes::N_ADC_MASK.data(), - adc_mask); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_ADC_MASK.data(), adc_mask)); } void test_master_file_analog_flag(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto romode = test_info.readout_mode; auto analog = static_cast( (romode == defs::ANALOG_ONLY || romode == defs::ANALOG_AND_DIGITAL)); - check_master_file(doc, MasterAttributes::N_ANALOG.data(), analog); + REQUIRE_NOTHROW( + check_master_file(doc, MasterAttributes::N_ANALOG.data(), analog)); } void test_master_file_analog_samples(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto analog_samples = test_info.num_adc_samples; - check_master_file(doc, MasterAttributes::N_ANALOG_SAMPLES.data(), - analog_samples); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_ANALOG_SAMPLES.data(), analog_samples)); } void test_master_file_digital_flag(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto romode = test_info.readout_mode; auto digital = static_cast(romode == defs::DIGITAL_ONLY || romode == defs::ANALOG_AND_DIGITAL || romode == defs::DIGITAL_AND_TRANSCEIVER); - check_master_file(doc, MasterAttributes::N_DIGITAL.data(), digital); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_DIGITAL.data(), digital)); } void test_master_file_digital_samples(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto digital_samples = test_info.num_dbit_samples; - check_master_file(doc, MasterAttributes::N_DIGITAL_SAMPLES.data(), - digital_samples); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_DIGITAL_SAMPLES.data(), digital_samples)); } void test_master_file_dbit_offset(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto dbit_offset = test_info.dbit_offset; - check_master_file(doc, MasterAttributes::N_DBIT_OFFSET.data(), - dbit_offset); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_DBIT_OFFSET.data(), dbit_offset)); } void test_master_file_dbit_reorder(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto dbit_reorder = test_info.dbit_reorder; - check_master_file(doc, MasterAttributes::N_DBIT_REORDER.data(), - dbit_reorder); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_DBIT_REORDER.data(), dbit_reorder)); } void test_master_file_dbit_bitset(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; uint64_t dbit_bitset = 0; for (auto &i : test_info.dbit_list) { dbit_bitset |= (static_cast(1) << i); } - check_master_file(doc, MasterAttributes::N_DBIT_BITSET.data(), - dbit_bitset); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_DBIT_BITSET.data(), dbit_bitset)); } void test_master_file_transceiver_mask(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto trans_mask = test_info.transceiver_mask; - check_master_file(doc, MasterAttributes::N_TRANSCEIVER_MASK.data(), - trans_mask); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_TRANSCEIVER_MASK.data(), trans_mask)); } void test_master_file_transceiver_flag(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto romode = test_info.readout_mode; auto trans = static_cast(romode == defs::DIGITAL_AND_TRANSCEIVER || romode == defs::TRANSCEIVER_ONLY); - check_master_file(doc, MasterAttributes::N_TRANSCEIVER.data(), trans); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_TRANSCEIVER.data(), trans)); } void test_master_file_transceiver_samples(const Detector &det, const std::optional &doc) { - testCtbAcquireInfo test_info; + testCtbAcquireInfo test_info{}; auto trans_samples = test_info.num_trans_samples; - check_master_file(doc, MasterAttributes::N_TRANSCEIVER_SAMPLES.data(), - trans_samples); + REQUIRE_NOTHROW(check_master_file( + doc, MasterAttributes::N_TRANSCEIVER_SAMPLES.data(), trans_samples)); } void test_master_file_common_metadata(const Detector &det, @@ -870,92 +882,92 @@ void test_master_file_common_metadata(const Detector &det, void test_master_file_jungfrau_metadata(const Detector &det, const std::optional &doc) { - test_master_file_common_metadata(det, doc); + REQUIRE_NOTHROW(test_master_file_common_metadata(det, doc)); // Jungfrau specific metadata - test_master_file_rois(det, doc); - test_master_file_exptime(det, doc); - test_master_file_period(det, doc); - test_master_file_num_udp_interfaces(det, doc); - test_master_file_read_n_rows(det, doc); - test_master_file_readout_speed(det, doc); + REQUIRE_NOTHROW(test_master_file_rois(det, doc)); + REQUIRE_NOTHROW(test_master_file_exptime(det, doc)); + REQUIRE_NOTHROW(test_master_file_period(det, doc)); + REQUIRE_NOTHROW(test_master_file_num_udp_interfaces(det, doc)); + REQUIRE_NOTHROW(test_master_file_read_n_rows(det, doc)); + REQUIRE_NOTHROW(test_master_file_readout_speed(det, doc)); } void test_master_file_eiger_metadata(const Detector &det, const std::optional &doc) { - test_master_file_common_metadata(det, doc); + REQUIRE_NOTHROW(test_master_file_common_metadata(det, doc)); // Eiger specific metadata - test_master_file_rois(det, doc); - test_master_file_dynamic_range(det, doc); - test_master_file_ten_giga(det, doc); - test_master_file_exptime(det, doc); - test_master_file_period(det, doc); - test_master_file_threshold_energy(det, doc); - test_master_file_sub_exptime(det, doc); - test_master_file_sub_period(det, doc); - test_master_file_quad(det, doc); - test_master_file_read_n_rows(det, doc); - test_master_file_rate_corrections(det, doc); - test_master_file_readout_speed(det, doc); + REQUIRE_NOTHROW(test_master_file_rois(det, doc)); + REQUIRE_NOTHROW(test_master_file_dynamic_range(det, doc)); + REQUIRE_NOTHROW(test_master_file_ten_giga(det, doc)); + REQUIRE_NOTHROW(test_master_file_exptime(det, doc)); + REQUIRE_NOTHROW(test_master_file_period(det, doc)); + REQUIRE_NOTHROW(test_master_file_threshold_energy(det, doc)); + REQUIRE_NOTHROW(test_master_file_sub_exptime(det, doc)); + REQUIRE_NOTHROW(test_master_file_sub_period(det, doc)); + REQUIRE_NOTHROW(test_master_file_quad(det, doc)); + REQUIRE_NOTHROW(test_master_file_read_n_rows(det, doc)); + REQUIRE_NOTHROW(test_master_file_rate_corrections(det, doc)); + REQUIRE_NOTHROW(test_master_file_readout_speed(det, doc)); } void test_master_file_moench_metadata(const Detector &det, const std::optional &doc) { - test_master_file_common_metadata(det, doc); + REQUIRE_NOTHROW(test_master_file_common_metadata(det, doc)); // Moench specific metadata - test_master_file_rois(det, doc); - test_master_file_exptime(det, doc); - test_master_file_period(det, doc); - test_master_file_num_udp_interfaces(det, doc); - test_master_file_read_n_rows(det, doc); - test_master_file_readout_speed(det, doc); + REQUIRE_NOTHROW(test_master_file_rois(det, doc)); + REQUIRE_NOTHROW(test_master_file_exptime(det, doc)); + REQUIRE_NOTHROW(test_master_file_period(det, doc)); + REQUIRE_NOTHROW(test_master_file_num_udp_interfaces(det, doc)); + REQUIRE_NOTHROW(test_master_file_read_n_rows(det, doc)); + REQUIRE_NOTHROW(test_master_file_readout_speed(det, doc)); } void test_master_file_mythen3_metadata(const Detector &det, const std::optional &doc) { - test_master_file_common_metadata(det, doc); + REQUIRE_NOTHROW(test_master_file_common_metadata(det, doc)); // Mythen3 specific metadata - test_master_file_rois(det, doc); - test_master_file_dynamic_range(det, doc); - test_master_file_ten_giga(det, doc); - test_master_file_period(det, doc); - test_master_file_counter_mask(det, doc); - test_master_file_exptimes(det, doc); - test_master_file_gate_delays(det, doc); - test_master_file_gates(det, doc); - test_master_file_threadhold_energies(det, doc); - test_master_file_readout_speed(det, doc); + REQUIRE_NOTHROW(test_master_file_rois(det, doc)); + REQUIRE_NOTHROW(test_master_file_dynamic_range(det, doc)); + REQUIRE_NOTHROW(test_master_file_ten_giga(det, doc)); + REQUIRE_NOTHROW(test_master_file_period(det, doc)); + REQUIRE_NOTHROW(test_master_file_counter_mask(det, doc)); + REQUIRE_NOTHROW(test_master_file_exptimes(det, doc)); + REQUIRE_NOTHROW(test_master_file_gate_delays(det, doc)); + REQUIRE_NOTHROW(test_master_file_gates(det, doc)); + REQUIRE_NOTHROW(test_master_file_threadhold_energies(det, doc)); + REQUIRE_NOTHROW(test_master_file_readout_speed(det, doc)); } void test_master_file_gotthard2_metadata(const Detector &det, const std::optional &doc) { - test_master_file_common_metadata(det, doc); + REQUIRE_NOTHROW(test_master_file_common_metadata(det, doc)); // Gotthard2 specific metadata - test_master_file_exptime(det, doc); - test_master_file_period(det, doc); - test_master_file_burst_mode(det, doc); - test_master_file_readout_speed(det, doc); + REQUIRE_NOTHROW(test_master_file_exptime(det, doc)); + REQUIRE_NOTHROW(test_master_file_period(det, doc)); + REQUIRE_NOTHROW(test_master_file_burst_mode(det, doc)); + REQUIRE_NOTHROW(test_master_file_readout_speed(det, doc)); } void test_master_file_ctb_metadata(const Detector &det, const std::optional &doc) { auto det_type = det.getDetectorType().squash(); - test_master_file_common_metadata(det, doc); + REQUIRE_NOTHROW(test_master_file_common_metadata(det, doc)); // Ctb specific metadata - test_master_file_exptime(det, doc); - test_master_file_period(det, doc); + REQUIRE_NOTHROW(test_master_file_exptime(det, doc)); + REQUIRE_NOTHROW(test_master_file_period(det, doc)); if (det_type == defs::CHIPTESTBOARD) - test_master_file_ten_giga(det, doc); - test_master_file_adc_mask(det, doc); - test_master_file_analog_flag(det, doc); - test_master_file_analog_samples(det, doc); - test_master_file_digital_flag(det, doc); - test_master_file_digital_samples(det, doc); - test_master_file_dbit_offset(det, doc); - test_master_file_dbit_reorder(det, doc); - test_master_file_dbit_bitset(det, doc); - test_master_file_transceiver_mask(det, doc); - test_master_file_transceiver_flag(det, doc); - test_master_file_transceiver_samples(det, doc); + REQUIRE_NOTHROW(test_master_file_ten_giga(det, doc)); + REQUIRE_NOTHROW(test_master_file_adc_mask(det, doc)); + REQUIRE_NOTHROW(test_master_file_analog_flag(det, doc)); + REQUIRE_NOTHROW(test_master_file_analog_samples(det, doc)); + REQUIRE_NOTHROW(test_master_file_digital_flag(det, doc)); + REQUIRE_NOTHROW(test_master_file_digital_samples(det, doc)); + REQUIRE_NOTHROW(test_master_file_dbit_offset(det, doc)); + REQUIRE_NOTHROW(test_master_file_dbit_reorder(det, doc)); + REQUIRE_NOTHROW(test_master_file_dbit_bitset(det, doc)); + REQUIRE_NOTHROW(test_master_file_transceiver_mask(det, doc)); + REQUIRE_NOTHROW(test_master_file_transceiver_flag(det, doc)); + REQUIRE_NOTHROW(test_master_file_transceiver_samples(det, doc)); } void test_master_file_metadata(const Detector &det, @@ -1038,7 +1050,7 @@ TEST_CASE("check_master_file_attributes", "[.cmdcall][.cmdacquire][.cmdattr]") { break; case defs::CHIPTESTBOARD: case defs::XILINX_CHIPTESTBOARD: { - testCtbAcquireInfo test_ctb_config; + testCtbAcquireInfo test_ctb_config{}; create_files_for_acquire(det, caller, num_frames, test_ctb_config); } break; default: diff --git a/slsReceiverSoftware/src/GeneralData.h b/slsReceiverSoftware/src/GeneralData.h index d60c3b726..b5b6e0b26 100644 --- a/slsReceiverSoftware/src/GeneralData.h +++ b/slsReceiverSoftware/src/GeneralData.h @@ -20,7 +20,6 @@ namespace sls { struct CtbImageInputs { slsDetectorDefs::readoutMode mode{slsDetectorDefs::ANALOG_ONLY}; - int nAnalogSamples{}; uint32_t adcMask{}; int nTransceiverSamples{}; @@ -29,6 +28,21 @@ struct CtbImageInputs { int dbitOffset{}; bool dbitReorder{}; std::vector dbitList{}; + + inline void print() const { + LOG(logINFO) << "CTB Image Inputs: " + << "Readout Mode:" << ToString(mode) + << "\n\tNumber of Analog Samples:" << nAnalogSamples + << "\n\tADC Enable 1G:" << std::hex << adcMask << std::dec + << "\n\tNumber of Transceiver Samples:" + << nTransceiverSamples + << "\n\tTransceiver Mask:" << std::hex << transceiverMask + << std::dec + << "\n\tNumber of Digital Samples:" << nDigitalSamples + << "\n\tDBIT Offset:" << dbitOffset + << "\n\tDBIT Reorder:" << dbitReorder + << "\n\tDBIT List:" << ToString(dbitList); + } }; struct CtbImageOutputs { @@ -37,15 +51,26 @@ struct CtbImageOutputs { int nDigitalBytesReserved{}; // including dbit offset and for 64 bits int nTransceiverBytes{}; int nPixelsX{}; + + inline void print() const { + LOG(logINFO) << "CTB Image Outputs: " + << "\n\tNumber of Analog Bytes:" << nAnalogBytes + << "\n\tNumber of Actual Digital Bytes:" << nDigitalBytes + << "\n\tNumber of Digital Bytes Reserved:" + << nDigitalBytesReserved + << "\n\tNumber of Transceiver Bytes:" << nTransceiverBytes + << "\n\tNumber of Pixels in X:" << nPixelsX; + } }; inline CtbImageOutputs computeCtbImageSize(const CtbImageInputs &in) { CtbImageOutputs out{}; - constexpr int num_bytes_per_analog_channel = 2; constexpr int num_bytes_per_transceiver_channel = 8; constexpr int max_digital_channels = 64; + // in.print(); // for debugging + // analog channels (normal, analog/digital readout) if (in.mode == slsDetectorDefs::ANALOG_ONLY || in.mode == slsDetectorDefs::ANALOG_AND_DIGITAL) { @@ -536,11 +561,20 @@ class ChipTestBoardData : public GeneralData { UpdateImageSize(); } - void SetctbDbitOffset(const int value) { ctbDbitOffset = value; } + void SetctbDbitOffset(const int value) { + ctbDbitOffset = value; + UpdateImageSize(); + } - void SetctbDbitList(const std::vector &value) { ctbDbitList = value; } + void SetctbDbitList(const std::vector &value) { + ctbDbitList = std::move(value); + UpdateImageSize(); + } - void SetctbDbitReorder(const bool value) { ctbDbitReorder = value; } + void SetctbDbitReorder(const bool value) { + ctbDbitReorder = value; + UpdateImageSize(); + } void SetOneGigaAdcEnableMask(int n) { adcEnableMaskOneGiga = n; @@ -574,6 +608,7 @@ class ChipTestBoardData : public GeneralData { // calculate image size CtbImageInputs inputs{}; + inputs.mode = readoutType; inputs.nAnalogSamples = nAnalogSamples; inputs.adcMask = tengigaEnable ? adcEnableMaskTenGiga : adcEnableMaskOneGiga; @@ -583,8 +618,13 @@ class ChipTestBoardData : public GeneralData { inputs.dbitOffset = ctbDbitOffset; inputs.dbitList = ctbDbitList; inputs.dbitReorder = ctbDbitReorder; + auto out = computeCtbImageSize(inputs); + nPixelsX = out.nPixelsX; + nAnalogBytes = out.nAnalogBytes; + nTransceiverBytes = out.nTransceiverBytes; + imageSize = out.nAnalogBytes + out.nDigitalBytesReserved + out.nTransceiverBytes; // to write to file: after ctb offset and reorder @@ -651,11 +691,20 @@ class XilinxChipTestBoardData : public GeneralData { UpdateImageSize(); }; - void SetctbDbitOffset(const int value) { ctbDbitOffset = value; } + void SetctbDbitOffset(const int value) { + ctbDbitOffset = value; + UpdateImageSize(); + } - void SetctbDbitList(const std::vector &value) { ctbDbitList = value; } + void SetctbDbitList(const std::vector &value) { + ctbDbitList = std::move(value); + UpdateImageSize(); + } - void SetctbDbitReorder(const bool value) { ctbDbitReorder = value; } + void SetctbDbitReorder(const bool value) { + ctbDbitReorder = value; + UpdateImageSize(); + } void SetTenGigaAdcEnableMask(int n) { adcEnableMaskTenGiga = n; @@ -679,6 +728,7 @@ class XilinxChipTestBoardData : public GeneralData { // calculate image size CtbImageInputs inputs{}; + inputs.mode = readoutType; inputs.nAnalogSamples = nAnalogSamples; inputs.adcMask = adcEnableMaskTenGiga; inputs.nTransceiverSamples = nTransceiverSamples; @@ -687,8 +737,13 @@ class XilinxChipTestBoardData : public GeneralData { inputs.dbitOffset = ctbDbitOffset; inputs.dbitList = ctbDbitList; inputs.dbitReorder = ctbDbitReorder; + auto out = computeCtbImageSize(inputs); + nPixelsX = out.nPixelsX; + nAnalogBytes = out.nAnalogBytes; + nTransceiverBytes = out.nTransceiverBytes; + imageSize = out.nAnalogBytes + out.nDigitalBytesReserved + out.nTransceiverBytes; // to write to file: after ctb offset and reorder diff --git a/tests/scripts/test_simulators.py b/tests/scripts/test_simulators.py index 3b5dbdd4a..9b535c29d 100644 --- a/tests/scripts/test_simulators.py +++ b/tests/scripts/test_simulators.py @@ -73,7 +73,7 @@ def startCmdTestsForAll(args, fp): if __name__ == '__main__': - args = ParseArguments('Automated tests with the virtual detector servers', 1, 1) + args = ParseArguments(description='Automated tests with the virtual detector servers', default_num_mods=1, markers=True, general_tests_option=True) if args.num_mods > 1: raise RuntimeException(f'Cannot support multiple modules at the moment (except Eiger).') @@ -81,7 +81,8 @@ if __name__ == '__main__': with open(MAIN_LOG_FNAME, 'w') as fp: try: - startGeneralTests(fp) + if args.general_tests: + startGeneralTests(fp) startCmdTestsForAll(args, fp) cleanup(fp) except Exception as e: diff --git a/tests/scripts/utils_for_test.py b/tests/scripts/utils_for_test.py index 74bbee464..7feb4e70e 100644 --- a/tests/scripts/utils_for_test.py +++ b/tests/scripts/utils_for_test.py @@ -255,7 +255,7 @@ def loadBasicSettings(name, d, fp): except Exception as e: raise RuntimeException(f'Could not load config for {name}. Error: {str(e)}') from e -def ParseArguments(description, default_num_mods=1, markers=0): +def ParseArguments(description, default_num_mods=1, markers=False, general_tests_option=False): parser = argparse.ArgumentParser(description) parser.add_argument('rx_hostname', nargs='?', default='localhost', @@ -268,10 +268,14 @@ def ParseArguments(description, default_num_mods=1, markers=0): help='Number of frames to test with') parser.add_argument('-s', '--servers', nargs='*', help='Detector servers to run') - if markers == 1: + if markers: parser.add_argument('-m', '--markers', nargs='?', default ='[.cmdcall]', help = 'Markers to use for cmd tests, default: [.cmdcall]') + if general_tests_option: + parser.add_argument('-g', '--general_tests', action='store_true', + help = 'Enable general tests (no value needed)') + args = parser.parse_args() # Set default server list if not provided @@ -294,8 +298,12 @@ def ParseArguments(description, default_num_mods=1, markers=0): f"num_mods: '{args.num_mods}'\n" f"num_frames: '{args.num_frames}'" ) - if markers == 1: + if markers: msg += f"\nmarkers: '{args.markers}'" + + if general_tests_option: + msg += f"\ngeneral_tests: '{args.general_tests}'" + Log(LogLevel.INFO, msg)