added last unittests
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
parent
165e6e829e
commit
1c17aac544
@ -232,6 +232,24 @@ TEST_CASE( "Core Controller Reboot File Handling", "[reboot-file]" ) {
|
|||||||
// Should be on 0 0 now
|
// Should be on 0 0 now
|
||||||
CHECK(CoreController::CURRENT_CHIP == xsc::CHIP_0);
|
CHECK(CoreController::CURRENT_CHIP == xsc::CHIP_0);
|
||||||
CHECK(CoreController::CURRENT_COPY == xsc::COPY_0);
|
CHECK(CoreController::CURRENT_COPY == xsc::COPY_0);
|
||||||
|
ctrl.performRebootFileHandling(false);
|
||||||
|
ctrl.parseRebootFile(REBOOT_FILE, rf);
|
||||||
|
REQUIRE(rf.enabled == 1);
|
||||||
|
REQUIRE(rf.img00Cnt == 1);
|
||||||
|
REQUIRE(rf.img01Cnt == 0);
|
||||||
|
REQUIRE(rf.img10Cnt == 5);
|
||||||
|
REQUIRE(rf.img11Cnt == 3);
|
||||||
|
|
||||||
|
// Now reset all reboot counters manually
|
||||||
|
ctrl.executeAction(CoreController::RESET_REBOOT_COUNTER_00, 0, nullptr, 0);
|
||||||
|
ctrl.executeAction(CoreController::RESET_REBOOT_COUNTER_10, 0, nullptr, 0);
|
||||||
|
ctrl.executeAction(CoreController::RESET_REBOOT_COUNTER_11, 0, nullptr, 0);
|
||||||
|
ctrl.parseRebootFile(REBOOT_FILE, rf);
|
||||||
|
REQUIRE(rf.enabled == 1);
|
||||||
|
REQUIRE(rf.img00Cnt == 0);
|
||||||
|
REQUIRE(rf.img01Cnt == 0);
|
||||||
|
REQUIRE(rf.img10Cnt == 0);
|
||||||
|
REQUIRE(rf.img11Cnt == 0);
|
||||||
}
|
}
|
||||||
if(std::filesystem::exists(CONF_PATH)) {
|
if(std::filesystem::exists(CONF_PATH)) {
|
||||||
std::uintmax_t n = std::filesystem::remove_all(CONF_PATH);
|
std::uintmax_t n = std::filesystem::remove_all(CONF_PATH);
|
||||||
|
Loading…
Reference in New Issue
Block a user