Loading media/codec2/hidl/1.0/vts/functional/component/VtsHalMediaC2V1_0TargetComponentTest.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ class Codec2ComponentHidlTestBase : public ::testing::Test { public: virtual void SetUp() override { getParams(); mDisableTest = false; mEos = false; mClient = android::Codec2Client::CreateFromService(mInstanceName.c_str()); ASSERT_NE(mClient, nullptr); Loading @@ -73,6 +74,14 @@ class Codec2ComponentHidlTestBase : public ::testing::Test { for (int i = 0; i < MAX_INPUT_BUFFERS; ++i) { mWorkQueue.emplace_back(new C2Work); } C2SecureModeTuning secureModeTuning{}; mComponent->query({&secureModeTuning}, {}, C2_MAY_BLOCK, nullptr); if (secureModeTuning.value != C2Config::SM_UNPROTECTED) { mDisableTest = true; } if (mDisableTest) std::cout << "[ WARN ] Test Disabled \n"; } virtual void TearDown() override { Loading Loading @@ -105,6 +114,7 @@ class Codec2ComponentHidlTestBase : public ::testing::Test { std::string mInstanceName; std::string mComponentName; bool mEos; bool mDisableTest; std::mutex mQueueLock; std::condition_variable mQueueCondition; std::list<std::unique_ptr<C2Work>> mWorkQueue; Loading Loading @@ -324,6 +334,7 @@ class Codec2ComponentInputTests : public Codec2ComponentHidlTestBase, }; TEST_P(Codec2ComponentInputTests, InputBufferTest) { if (mDisableTest) GTEST_SKIP() << "Test is disabled"; description("Tests for different inputs"); uint32_t flags = std::get<2>(GetParam()); Loading Loading
media/codec2/hidl/1.0/vts/functional/component/VtsHalMediaC2V1_0TargetComponentTest.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ class Codec2ComponentHidlTestBase : public ::testing::Test { public: virtual void SetUp() override { getParams(); mDisableTest = false; mEos = false; mClient = android::Codec2Client::CreateFromService(mInstanceName.c_str()); ASSERT_NE(mClient, nullptr); Loading @@ -73,6 +74,14 @@ class Codec2ComponentHidlTestBase : public ::testing::Test { for (int i = 0; i < MAX_INPUT_BUFFERS; ++i) { mWorkQueue.emplace_back(new C2Work); } C2SecureModeTuning secureModeTuning{}; mComponent->query({&secureModeTuning}, {}, C2_MAY_BLOCK, nullptr); if (secureModeTuning.value != C2Config::SM_UNPROTECTED) { mDisableTest = true; } if (mDisableTest) std::cout << "[ WARN ] Test Disabled \n"; } virtual void TearDown() override { Loading Loading @@ -105,6 +114,7 @@ class Codec2ComponentHidlTestBase : public ::testing::Test { std::string mInstanceName; std::string mComponentName; bool mEos; bool mDisableTest; std::mutex mQueueLock; std::condition_variable mQueueCondition; std::list<std::unique_ptr<C2Work>> mWorkQueue; Loading Loading @@ -324,6 +334,7 @@ class Codec2ComponentInputTests : public Codec2ComponentHidlTestBase, }; TEST_P(Codec2ComponentInputTests, InputBufferTest) { if (mDisableTest) GTEST_SKIP() << "Test is disabled"; description("Tests for different inputs"); uint32_t flags = std::get<2>(GetParam()); Loading