From 8fc14a8d991a2508d045079a58a2d79b7e205c82 Mon Sep 17 00:00:00 2001 From: Hongguang Chen Date: Wed, 19 May 2021 15:43:29 -0700 Subject: [PATCH] Remove some TODOs from tuner HAL and its VTS. 1) The tuner cases should be always allowed on devices w/o tuner. -- VTS is common for all devices, we must allow the tuner cases to pass/skip on non TV devices. -- The tuner HAL is also optional on TV devices, like OTT, the tuner VTS cases should be skipped on those devices too. 2) Filter type has been checked in Demux::attachRecordFilter(). Bug: 188709323 Test: make vts Change-Id: Ifd1cb805d7f5d552a4aa7365ba78ff87b8a3ccc1 --- tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.h | 8 -------- tv/tuner/1.1/default/Dvr.cpp | 1 - tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.h | 3 +-- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.h b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.h index 8358291cf3..7243a42c60 100644 --- a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.h +++ b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.h @@ -79,7 +79,6 @@ class TunerFrontendHidlTest : public testing::TestWithParam { FrontendTests mFrontendTests; }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerFrontendHidlTest); class TunerLnbHidlTest : public testing::TestWithParam { @@ -101,7 +100,6 @@ class TunerLnbHidlTest : public testing::TestWithParam { LnbTests mLnbTests; }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerLnbHidlTest); class TunerDemuxHidlTest : public testing::TestWithParam { @@ -127,7 +125,6 @@ class TunerDemuxHidlTest : public testing::TestWithParam { FilterTests mFilterTests; }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerDemuxHidlTest); class TunerFilterHidlTest : public testing::TestWithParam { @@ -179,7 +176,6 @@ class TunerFilterHidlTest : public testing::TestWithParam { FilterTests mFilterTests; }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerFilterHidlTest); class TunerBroadcastHidlTest : public testing::TestWithParam { @@ -218,7 +214,6 @@ class TunerBroadcastHidlTest : public testing::TestWithParam { uint32_t* mLnbId = nullptr; }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerBroadcastHidlTest); class TunerPlaybackHidlTest : public testing::TestWithParam { @@ -250,7 +245,6 @@ class TunerPlaybackHidlTest : public testing::TestWithParam { void playbackSingleFilterTest(FilterConfig filterConf, DvrConfig dvrConf); }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerPlaybackHidlTest); class TunerRecordHidlTest : public testing::TestWithParam { @@ -290,7 +284,6 @@ class TunerRecordHidlTest : public testing::TestWithParam { uint32_t* mLnbId = nullptr; }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerRecordHidlTest); class TunerDescramblerHidlTest : public testing::TestWithParam { @@ -327,6 +320,5 @@ class TunerDescramblerHidlTest : public testing::TestWithParam { DvrTests mDvrTests; }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerDescramblerHidlTest); } // namespace diff --git a/tv/tuner/1.1/default/Dvr.cpp b/tv/tuner/1.1/default/Dvr.cpp index c487d98c36..93f4519f10 100644 --- a/tv/tuner/1.1/default/Dvr.cpp +++ b/tv/tuner/1.1/default/Dvr.cpp @@ -81,7 +81,6 @@ Return Dvr::attachFilter(const sp& filter) { return status; } - // TODO check if the attached filter is a record filter if (!mDemux->attachRecordFilter(filterId)) { return Result::INVALID_ARGUMENT; } diff --git a/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.h b/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.h index 007e3d53df..13b9640749 100644 --- a/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.h +++ b/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.h @@ -156,6 +156,5 @@ class TunerBroadcastHidlTest : public testing::TestWithParam { FrontendConfig1_1 frontendConf); }; -// TODO remove from the allow list once the cf tv target is enabled for testing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TunerBroadcastHidlTest); -} // namespace \ No newline at end of file +} // namespace