mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
tests: transmission delay cannot be got for a single module for jf and m3, resetting fpga is not an option to test others
This commit is contained in:
parent
104bc6f619
commit
68beba732e
@ -2745,6 +2745,20 @@ TEST_CASE("txdelay", "[.cmd]") {
|
|||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU ||
|
||||||
det_type == defs::MYTHEN3) {
|
det_type == defs::MYTHEN3) {
|
||||||
|
|
||||||
|
// cannot get transmission delay with just one module
|
||||||
|
if ((det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3) && (det.size() < 2)) {
|
||||||
|
REQUIRE_THROWS(proxy.Call("txdelay", {}, -1, GET));
|
||||||
|
int val = 5;
|
||||||
|
std::string sval = std::to_string(val);
|
||||||
|
{
|
||||||
|
std::ostringstream oss1;
|
||||||
|
proxy.Call("txdelay", {sval}, -1, PUT, oss1);
|
||||||
|
REQUIRE(oss1.str() == "txdelay " + sval + "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
Result<int> prev_left, prev_right;
|
Result<int> prev_left, prev_right;
|
||||||
bool eiger = false;
|
bool eiger = false;
|
||||||
if (det_type == defs::EIGER) {
|
if (det_type == defs::EIGER) {
|
||||||
@ -2790,6 +2804,7 @@ TEST_CASE("txdelay", "[.cmd]") {
|
|||||||
}
|
}
|
||||||
det.setTransmissionDelayFrame(prev_frame[i]);
|
det.setTransmissionDelayFrame(prev_frame[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
REQUIRE_THROWS(proxy.Call("txdelay", {}, -1, GET));
|
REQUIRE_THROWS(proxy.Call("txdelay", {}, -1, GET));
|
||||||
}
|
}
|
||||||
@ -2912,9 +2927,10 @@ TEST_CASE("resetfpga", "[.cmd]") {
|
|||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||||
det_type == defs::MOENCH) {
|
det_type == defs::MOENCH) {
|
||||||
std::ostringstream oss;
|
// reset will also reset udp info from config file (comment out for invdividual tests)
|
||||||
proxy.Call("resetfpga", {}, -1, PUT, oss);
|
// std::ostringstream oss;
|
||||||
REQUIRE(oss.str() == "resetfpga successful\n");
|
// proxy.Call("resetfpga", {}, -1, PUT, oss);
|
||||||
|
// REQUIRE(oss.str() == "resetfpga successful\n");
|
||||||
REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, GET));
|
REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, GET));
|
||||||
} else {
|
} else {
|
||||||
REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, GET));
|
REQUIRE_THROWS(proxy.Call("resetfpga", {}, -1, GET));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user