mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:09:42 +00:00
Skip test on VtsHalTvTunerV1_0TargetTest if tuner type unsupported
Check tuner type before running VtsHalTvTunerV1_0TargetTest, skip testcase if test is not design for that type of tuner. Bug: 194774941 Test: run vts -m VtsHalTvTunerV1_0TargetTest Change-Id: Iacd1356e9e60e9b69ecbe38f8d1f76f42138efb0
This commit is contained in:
5
tv/tuner/1.0/vts/functional/FrontendTests.cpp
Normal file → Executable file
5
tv/tuner/1.0/vts/functional/FrontendTests.cpp
Normal file → Executable file
@@ -430,6 +430,9 @@ void FrontendTests::getFrontendIdByType(FrontendType feType, uint32_t& feId) {
|
||||
|
||||
void FrontendTests::tuneTest(FrontendConfig frontendConf) {
|
||||
uint32_t feId;
|
||||
if (frontendConf.type != FrontendType::DVBC)
|
||||
GTEST_SKIP() << "Skipping this test since not DVBC.";
|
||||
|
||||
getFrontendIdByType(frontendConf.type, feId);
|
||||
ASSERT_TRUE(feId != INVALID_ID);
|
||||
ASSERT_TRUE(openFrontendById(feId));
|
||||
@@ -442,6 +445,8 @@ void FrontendTests::tuneTest(FrontendConfig frontendConf) {
|
||||
|
||||
void FrontendTests::scanTest(FrontendConfig frontendConf, FrontendScanType scanType) {
|
||||
uint32_t feId;
|
||||
if (frontendConf.type != FrontendType::DVBC)
|
||||
GTEST_SKIP() << "Skipping this test since not DVBC.";
|
||||
getFrontendIdByType(frontendConf.type, feId);
|
||||
ASSERT_TRUE(feId != INVALID_ID);
|
||||
ASSERT_TRUE(openFrontendById(feId));
|
||||
|
||||
14
tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp
Normal file → Executable file
14
tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp
Normal file → Executable file
@@ -37,6 +37,8 @@ void TunerFilterHidlTest::configSingleFilterInDemuxTest(FilterConfig filterConf,
|
||||
uint32_t demuxId;
|
||||
sp<IDemux> demux;
|
||||
uint32_t filterId;
|
||||
if (frontendConf.type != FrontendType::DVBC)
|
||||
GTEST_SKIP() << "Skipping this test since not DVBC.";
|
||||
|
||||
mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
|
||||
ASSERT_TRUE(feId != INVALID_ID);
|
||||
@@ -174,6 +176,9 @@ void TunerRecordHidlTest::recordSingleFilterTest(FilterConfig filterConf,
|
||||
uint32_t filterId;
|
||||
sp<IFilter> filter;
|
||||
|
||||
if (frontendConf.type != FrontendType::DVBC)
|
||||
GTEST_SKIP() << "Skipping this test since not DVBC.";
|
||||
|
||||
mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
|
||||
ASSERT_TRUE(feId != INVALID_ID);
|
||||
ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
|
||||
@@ -240,6 +245,9 @@ void TunerRecordHidlTest::attachSingleFilterToRecordDvrTest(FilterConfig filterC
|
||||
uint32_t filterId;
|
||||
sp<IFilter> filter;
|
||||
|
||||
if (frontendConf.type != FrontendType::DVBC)
|
||||
GTEST_SKIP() << "Skipping this test since not DVBC.";
|
||||
|
||||
mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
|
||||
ASSERT_TRUE(feId != INVALID_ID);
|
||||
ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
|
||||
@@ -390,6 +398,8 @@ TEST_P(TunerDemuxHidlTest, openDemux) {
|
||||
uint32_t demuxId;
|
||||
sp<IDemux> demux;
|
||||
mFrontendTests.getFrontendIdByType(frontendArray[defaultFrontend].type, feId);
|
||||
if (frontendArray[DVBT].type != FrontendType::DVBC)
|
||||
GTEST_SKIP() << "Skipping this test since not DVBC.";
|
||||
ASSERT_TRUE(feId != INVALID_ID);
|
||||
ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
|
||||
ASSERT_TRUE(mFrontendTests.setFrontendCallback());
|
||||
@@ -408,6 +418,8 @@ TEST_P(TunerDemuxHidlTest, getAvSyncTime) {
|
||||
uint32_t pcrFilterId;
|
||||
uint32_t avSyncHwId;
|
||||
sp<IFilter> mediaFilter;
|
||||
if (frontendArray[DVBT].type != FrontendType::DVBC)
|
||||
GTEST_SKIP() << "Skipping this test since not DVBC.";
|
||||
|
||||
mFrontendTests.getFrontendIdByType(frontendArray[defaultFrontend].type, feId);
|
||||
ASSERT_TRUE(feId != INVALID_ID);
|
||||
@@ -531,6 +543,8 @@ TEST_P(TunerDescramblerHidlTest, CreateDescrambler) {
|
||||
uint32_t demuxId;
|
||||
sp<IDemux> demux;
|
||||
mFrontendTests.getFrontendIdByType(frontendArray[defaultFrontend].type, feId);
|
||||
if (frontendArray[DVBT].type != FrontendType::DVBC)
|
||||
GTEST_SKIP() << "Skipping this test since not DVBC.";
|
||||
ASSERT_TRUE(feId != INVALID_ID);
|
||||
ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
|
||||
ASSERT_TRUE(mFrontendTests.setFrontendCallback());
|
||||
|
||||
Reference in New Issue
Block a user