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
Bug: 194827876
Test: atest VtsHalMediaOmxV1_0TargetStoreTest
Change-Id: Ia9e64c8d887518f6c7d8c650a942bad7ce3457f0
This commit is contained in:
Lajos Molnar 2020-11-04 11:50:41 -08:00 committed by Wonsik Kim
parent b2239ad43f
commit 7f8fb92524

View file

@ -264,11 +264,13 @@ TEST_P(StoreHidlTest, 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 "
<< (role.isEncoder ? "an encoder " : "a decoder ")
<< "for mime type \"" << role.type << ".";
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 media type \""
<< role.type << ".";
}
// Check the nodes for this role
std::set<const std::string> nodeKeys;