VtsHalMediaOmx should test functionality only

The tests insisted on presence of codecs as well as functionality, but
the list it reads is a superset of what may be on the device.  Modified so
that if a codec is not present, we ignore it rather than failing the test.

The Vts tests that check OMX Store are being augmented to ensure any
advertised codecs are indeed present.

Bug: 80029024
Bug: 80530946
Test: vts run VtsHalMediaOmxV1_0Host
Change-Id: Icd6d049c5c0d31f47ef3dbda52d6927e38bd894d
This commit is contained in:
Ray Essick
2018-06-01 16:22:29 -07:00
parent 739c3177ea
commit 68df40f9cf
5 changed files with 25 additions and 0 deletions

View File

@@ -86,6 +86,11 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
this->omxNode = _nl;
})
.isOk());
if (status == android::hardware::media::omx::V1_0::Status::NAME_NOT_FOUND) {
disableTest = true;
std::cout << "[ WARN ] Test Disabled, component not present\n";
return;
}
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
ASSERT_NE(omxNode, nullptr);
ASSERT_NE(gEnv->getRole().empty(), true) << "Invalid Component Role";

View File

@@ -86,6 +86,11 @@ class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
this->omxNode = _nl;
})
.isOk());
if (status == android::hardware::media::omx::V1_0::Status::NAME_NOT_FOUND) {
disableTest = true;
std::cout << "[ WARN ] Test Disabled, component not present\n";
return;
}
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
ASSERT_NE(omxNode, nullptr);
ASSERT_NE(gEnv->getRole().empty(), true) << "Invalid Component Role";

View File

@@ -80,6 +80,11 @@ class ComponentHidlTest : public ::testing::VtsHalHidlTargetTestBase {
this->omxNode = _nl;
})
.isOk());
if (status == android::hardware::media::omx::V1_0::Status::NAME_NOT_FOUND) {
disableTest = true;
std::cout << "[ WARN ] Test Disabled, component not present\n";
return;
}
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
ASSERT_NE(omxNode, nullptr);
ASSERT_NE(gEnv->getRole().empty(), true) << "Invalid Component Role";

View File

@@ -87,6 +87,11 @@ class VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
this->omxNode = _nl;
})
.isOk());
if (status == android::hardware::media::omx::V1_0::Status::NAME_NOT_FOUND) {
disableTest = true;
std::cout << "[ WARN ] Test Disabled, component not present\n";
return;
}
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
ASSERT_NE(omxNode, nullptr);
ASSERT_NE(gEnv->getRole().empty(), true) << "Invalid Component Role";

View File

@@ -100,6 +100,11 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
this->omxNode = _nl;
})
.isOk());
if (status == android::hardware::media::omx::V1_0::Status::NAME_NOT_FOUND) {
disableTest = true;
std::cout << "[ WARN ] Test Disabled, component not present\n";
return;
}
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
ASSERT_NE(omxNode, nullptr);
ASSERT_NE(gEnv->getRole().empty(), true) << "Invalid Component Role";