Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71a7913e authored by David Anderson's avatar David Anderson
Browse files

Make VtsHalBootAidlTargetTest failures easier to debug.

Bug: 384925942
Test: manual test
Change-Id: Id6688dcb58e7849ca031d9aa6d10e4dde6284a24
parent 7c2a7432
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -84,20 +84,20 @@ TEST_P(BootAidlTest, SetActiveBootSlot) {

    for (int s = 0; s < 2; s++) {
        const auto result = boot->setActiveBootSlot(s);
        ASSERT_TRUE(result.isOk());
        ASSERT_TRUE(result.isOk()) << result;
    }
    {
        // Restore original flags to avoid problems on reboot
        auto result = boot->setActiveBootSlot(curSlot);
        ASSERT_TRUE(result.isOk());
        ASSERT_TRUE(result.isOk()) << result;

        if (!otherBootable) {
            const auto result = boot->setSlotAsUnbootable(otherSlot);
            ASSERT_TRUE(result.isOk());
            ASSERT_TRUE(result.isOk()) << result;
        }

        result = boot->markBootSuccessful();
        ASSERT_TRUE(result.isOk());
        ASSERT_TRUE(result.isOk()) << result;
    }
    {
        int slots = 0;
@@ -116,19 +116,19 @@ TEST_P(BootAidlTest, SetSlotAsUnbootable) {
    boot->isSlotBootable(otherSlot, &otherBootable);
    {
        auto result = boot->setSlotAsUnbootable(otherSlot);
        ASSERT_TRUE(result.isOk());
        ASSERT_TRUE(result.isOk()) << result;
        boot->isSlotBootable(otherSlot, &otherBootable);
        ASSERT_FALSE(otherBootable);

        // Restore original flags to avoid problems on reboot
        if (otherBootable) {
            result = boot->setActiveBootSlot(otherSlot);
            ASSERT_TRUE(result.isOk());
            ASSERT_TRUE(result.isOk()) << result;
        }
        result = boot->setActiveBootSlot(curSlot);
        ASSERT_TRUE(result.isOk());
        ASSERT_TRUE(result.isOk()) << result;
        result = boot->markBootSuccessful();
        ASSERT_TRUE(result.isOk());
        ASSERT_TRUE(result.isOk()) << result;
    }
    {
        int32_t slots = 0;
@@ -143,7 +143,7 @@ TEST_P(BootAidlTest, IsSlotBootable) {
    for (int s = 0; s < 2; s++) {
        bool bootable = false;
        const auto res = boot->isSlotBootable(s, &bootable);
        ASSERT_TRUE(res.isOk()) << res.getMessage();
        ASSERT_TRUE(res.isOk()) << res;
    }
    int32_t slots = 0;
    boot->getNumberSlots(&slots);
@@ -184,7 +184,7 @@ TEST_P(BootAidlTest, GetSuffix) {
    {
        const string emptySuffix = "";
        const auto result = boot->getSuffix(numSlots, &suffixStr);
        ASSERT_TRUE(result.isOk());
        ASSERT_TRUE(result.isOk()) << result;
        ASSERT_EQ(suffixStr, emptySuffix);
    }
}