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

Commit 9bb689da authored by Lajos Molnar's avatar Lajos Molnar
Browse files

omx: validate only standard OMX roles

Test uses ::android::GetComponentRole to get OMX role for media type
that only supports standard types (on GSI where VTS is run).

Bug: 164550113
Bug: 171536493
Change-Id: Ia9e64c8d887518f6c7d8c650a942bad7ce3457f0
parent d973ce2a
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -264,11 +264,13 @@ TEST_P(MasterHidlTest, ListRoles) {

        // Make sure role name follows expected format based on type and
        // isEncoder
        const std::string role_name(
                ::android::GetComponentRole(role.isEncoder, role.type.c_str()));
        EXPECT_EQ(role_name, role.role) << "Role \"" << role.role << "\" does not match "
        const char *role_name =
            ::android::GetComponentRole(role.isEncoder, role.type.c_str());
        if (role_name != nullptr) {
            EXPECT_EQ(std::string(role_name), role.role) << "Role \"" << role.role << "\" does not match "
                                        << (role.isEncoder ? "an encoder " : "a decoder ")
                                        << "for mime type \"" << role.type << ".";
                                        << "for media type \"" << role.type << ".";
        }

        // Check the nodes for this role
        std::set<const std::string> nodeKeys;