updating kernel like program fpga, execute command to print which module failed, unlinking temporary file while programming bug fix

This commit is contained in:
2021-11-03 17:17:24 +01:00
parent 98cf908918
commit 6e49b77b08
14 changed files with 435 additions and 20 deletions

View File

@ -2708,6 +2708,25 @@ TEST_CASE("copydetectorserver", "[.cmd]") {
}
}
TEST_CASE("updatekernel", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash();
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
det_type == defs::GOTTHARD2) {
// TODO: send real server?
// std::ostringstream oss;
// proxy.Call("updatekernel",{"juImage_detector.lzma",
// "pc13784"}, -1, PUT, oss);
// REQUIRE(oss.str() == "updatekernel successful\n");
REQUIRE_THROWS(proxy.Call("updatekernel", {}, -1, GET));
} else {
REQUIRE_THROWS(proxy.Call("updatekernel", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("updatekernel", {}, -1, PUT));
}
}
TEST_CASE("rebootcontroller", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);