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

Commit 78140982 authored by Rocky Fang's avatar Rocky Fang
Browse files

Ignore NanSessionStateChange test for old HAL

Test: Tested on V1 HAL, before this change, it failed. After this
change, it showed ignored.
Bug: 287400067

Change-Id: I171cfd08da97d0b5830d241a9cd6ce2fa1f899dc
parent a9d135cd
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -385,10 +385,16 @@ TEST_P(ContextHubAidl, TestInvalidHostConnection) {
TEST_P(ContextHubAidl, TestNanSessionStateChange) {
    NanSessionStateUpdate update;
    update.state = true;
    ASSERT_TRUE(contextHub->onNanSessionStateChanged(update).isOk());
    Status status = contextHub->onNanSessionStateChanged(update);
    if (status.exceptionCode() == Status::EX_UNSUPPORTED_OPERATION ||
        status.transactionError() == android::UNKNOWN_TRANSACTION) {
        GTEST_SKIP() << "Not supported -> old API; or not implemented";
    } else {
        ASSERT_TRUE(status.isOk());
        update.state = false;
        ASSERT_TRUE(contextHub->onNanSessionStateChanged(update).isOk());
    }
}

std::string PrintGeneratedTest(const testing::TestParamInfo<ContextHubAidl::ParamType>& info) {
    return std::string("CONTEXT_HUB_ID_") + std::to_string(std::get<1>(info.param));