fixed ctb guard tests
Build on RHEL9 docker image / build (push) Successful in 3m48s
Build on RHEL8 docker image / build (push) Successful in 5m4s
Run Simulator Tests on local RHEL9 / build (push) Failing after 18m26s
Run Simulator Tests on local RHEL8 / build (push) Failing after 20m51s

This commit is contained in:
2026-06-10 01:27:30 +02:00
parent 8477152318
commit e106bc4e1e
6 changed files with 147 additions and 82 deletions
@@ -33,6 +33,17 @@ TEST_CASE("check_master_file_attributes",
auto acq_state = acq::default_acquisition_state();
auto file_state = acq::default_file_state();
// if ctb, set to default and restore after test
auto detType = det.getDetectorType().squash(defs::GENERIC);
std::optional<acq::CTBState> ctb_state = std::nullopt;
if (detType == defs::CHIPTESTBOARD ||
detType == defs::XILINX_CHIPTESTBOARD) {
ctb_state = std::make_optional(acq::default_ctb_state(detType));
}
acq::CTBStateGuard ctb_guard(det, ctb_state);
INFO("Checking master file attributes for " << ToString(detType));
// binary => /tmp/sls_test_master_0.json
file_state.file_format = defs::BINARY;
acq::run(det, acq_state, file_state);
@@ -42,7 +53,7 @@ TEST_CASE("check_master_file_attributes",
// get expected state of parameters and check against master file
acq::ExpectedState expected_state =
acq::build_expected_state(det, acq_state, file_state);
acq::build_expected_state(det, acq_state, file_state, ctb_state);
checks::check_metadata(checker, expected_state);
#ifdef HDF5C
@@ -56,7 +67,7 @@ TEST_CASE("check_master_file_attributes",
// get expected state of parameters and check against master file
acq::ExpectedState expected_state =
acq::build_expected_state(det, acq_state, file_state);
acq::build_expected_state(det, acq_state, file_state, ctb_state);
checks::check_metadata(checker, expected_state);
} catch (H5::Exception &e) {
LOG(logERROR) << "HDF5 error: " << e.getDetailMsg();