Files
slsDetectorPackage/slsDetectorSoftware/tests/Caller/test-Caller-master-attributes.cpp
T
maliakal_d 9e97799102
Build on RHEL9 docker image / build (push) Successful in 4m6s
Build on RHEL8 docker image / build (push) Successful in 5m59s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m38s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m5s
refactoring
2026-06-12 17:37:59 +02:00

39 lines
1.3 KiB
C++

// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#include "sls/Detector.h"
#include "sls/ToString.h"
#include "test-Caller-global.h"
#include "catch.hpp"
#include <string>
namespace sls {
namespace acq = sls::test::acquire;
TEST_CASE("check_master_file_attributes",
"[.detectorintegration][.disable_check_data_file]") {
Detector det;
auto detType = det.getDetectorType().squash(defs::GENERIC);
INFO("Testing master file attributes with " << ToString(detType));
// if ctb, set to default and restore after test
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);
test_run_with_master_file_checker(
det, [&](auto &det, auto &acq_state, auto &file_state, auto &checker) {
// get expected state of parameters and check against master file
auto expected_state = acq::build_expected_state(
det, acq_state, file_state, ctb_state);
checks::check_metadata(checker, expected_state);
});
}
} // namespace sls