mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
fixed tests to get headwareversion number instead of serial number to know ic 2.0 jf boards nd also the set master fail only if more than 1 detector (fix intests only)
This commit is contained in:
parent
66cf1825ea
commit
104bc6f619
@ -566,8 +566,8 @@ TEST_CASE("fliprows", "[.cmd]") {
|
|||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
bool jungfrauhw2 = false;
|
bool jungfrauhw2 = false;
|
||||||
if (det_type == defs::JUNGFRAU &&
|
if (det_type == defs::JUNGFRAU &&
|
||||||
((det.getSerialNumber().tsquash("inconsistent serial number to test") &
|
((det.getHardwareVersion().tsquash("inconsistent serial number to test")
|
||||||
0x30000) == 0x30000)) {
|
== "2.0"))) {
|
||||||
jungfrauhw2 = true;
|
jungfrauhw2 = true;
|
||||||
}
|
}
|
||||||
if (det_type == defs::EIGER || jungfrauhw2) {
|
if (det_type == defs::EIGER || jungfrauhw2) {
|
||||||
@ -625,7 +625,9 @@ TEST_CASE("master", "[.cmd]") {
|
|||||||
proxy.Call("master", {"1"}, 0, PUT, oss1);
|
proxy.Call("master", {"1"}, 0, PUT, oss1);
|
||||||
REQUIRE(oss1.str() == "master 1\n");
|
REQUIRE(oss1.str() == "master 1\n");
|
||||||
}
|
}
|
||||||
|
if (det.size() > 1) {
|
||||||
REQUIRE_THROWS(proxy.Call("master", {"1"}, -1, PUT));
|
REQUIRE_THROWS(proxy.Call("master", {"1"}, -1, PUT));
|
||||||
|
}
|
||||||
// set all to slaves, and then master
|
// set all to slaves, and then master
|
||||||
for (int i = 0; i != det.size(); ++i) {
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
det.setMaster(0, {i});
|
det.setMaster(0, {i});
|
||||||
@ -1650,9 +1652,8 @@ TEST_CASE("readnrows", "[.cmd]") {
|
|||||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||||
bool jungfrauhw2 = false;
|
bool jungfrauhw2 = false;
|
||||||
if (det_type == defs::JUNGFRAU &&
|
if (det_type == defs::JUNGFRAU &&
|
||||||
((det.getSerialNumber().tsquash(
|
((det.getHardwareVersion().tsquash("inconsistent hardware version number to test")
|
||||||
"inconsistent serial number to test") &
|
== "2.0"))) {
|
||||||
0x30000) == 0x30000)) {
|
|
||||||
jungfrauhw2 = true;
|
jungfrauhw2 = true;
|
||||||
}
|
}
|
||||||
if (det_type == defs::JUNGFRAU && !jungfrauhw2) {
|
if (det_type == defs::JUNGFRAU && !jungfrauhw2) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user