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
This commit is contained in:
Lajos Molnar
2020-11-04 11:50:41 -08:00
parent d973ce2ac1
commit 9bb689da23

View File

@@ -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;