Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c1a0a6b authored by derek.li's avatar derek.li Committed by derek li
Browse files

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
parent 6bf77fdf
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -430,6 +430,9 @@ void FrontendTests::getFrontendIdByType(FrontendType feType, uint32_t& feId) {


void FrontendTests::tuneTest(FrontendConfig frontendConf) {
void FrontendTests::tuneTest(FrontendConfig frontendConf) {
    uint32_t feId;
    uint32_t feId;
    if (frontendConf.type != FrontendType::DVBC)
        GTEST_SKIP() << "Skipping this test since not DVBC.";

    getFrontendIdByType(frontendConf.type, feId);
    getFrontendIdByType(frontendConf.type, feId);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(openFrontendById(feId));
    ASSERT_TRUE(openFrontendById(feId));
@@ -442,6 +445,8 @@ void FrontendTests::tuneTest(FrontendConfig frontendConf) {


void FrontendTests::scanTest(FrontendConfig frontendConf, FrontendScanType scanType) {
void FrontendTests::scanTest(FrontendConfig frontendConf, FrontendScanType scanType) {
    uint32_t feId;
    uint32_t feId;
    if (frontendConf.type != FrontendType::DVBC)
        GTEST_SKIP() << "Skipping this test since not DVBC.";
    getFrontendIdByType(frontendConf.type, feId);
    getFrontendIdByType(frontendConf.type, feId);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(openFrontendById(feId));
    ASSERT_TRUE(openFrontendById(feId));
+14 −0
Original line number Original line Diff line number Diff line
@@ -37,6 +37,8 @@ void TunerFilterHidlTest::configSingleFilterInDemuxTest(FilterConfig filterConf,
    uint32_t demuxId;
    uint32_t demuxId;
    sp<IDemux> demux;
    sp<IDemux> demux;
    uint32_t filterId;
    uint32_t filterId;
    if (frontendConf.type != FrontendType::DVBC)
        GTEST_SKIP() << "Skipping this test since not DVBC.";


    mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
    mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(feId != INVALID_ID);
@@ -174,6 +176,9 @@ void TunerRecordHidlTest::recordSingleFilterTest(FilterConfig filterConf,
    uint32_t filterId;
    uint32_t filterId;
    sp<IFilter> filter;
    sp<IFilter> filter;


    if (frontendConf.type != FrontendType::DVBC)
        GTEST_SKIP() << "Skipping this test since not DVBC.";

    mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
    mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
    ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
@@ -240,6 +245,9 @@ void TunerRecordHidlTest::attachSingleFilterToRecordDvrTest(FilterConfig filterC
    uint32_t filterId;
    uint32_t filterId;
    sp<IFilter> filter;
    sp<IFilter> filter;


    if (frontendConf.type != FrontendType::DVBC)
        GTEST_SKIP() << "Skipping this test since not DVBC.";

    mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
    mFrontendTests.getFrontendIdByType(frontendConf.type, feId);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
    ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
@@ -390,6 +398,8 @@ TEST_P(TunerDemuxHidlTest, openDemux) {
    uint32_t demuxId;
    uint32_t demuxId;
    sp<IDemux> demux;
    sp<IDemux> demux;
    mFrontendTests.getFrontendIdByType(frontendArray[defaultFrontend].type, feId);
    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(feId != INVALID_ID);
    ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
    ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
    ASSERT_TRUE(mFrontendTests.setFrontendCallback());
    ASSERT_TRUE(mFrontendTests.setFrontendCallback());
@@ -408,6 +418,8 @@ TEST_P(TunerDemuxHidlTest, getAvSyncTime) {
    uint32_t pcrFilterId;
    uint32_t pcrFilterId;
    uint32_t avSyncHwId;
    uint32_t avSyncHwId;
    sp<IFilter> mediaFilter;
    sp<IFilter> mediaFilter;
    if (frontendArray[DVBT].type != FrontendType::DVBC)
        GTEST_SKIP() << "Skipping this test since not DVBC.";


    mFrontendTests.getFrontendIdByType(frontendArray[defaultFrontend].type, feId);
    mFrontendTests.getFrontendIdByType(frontendArray[defaultFrontend].type, feId);
    ASSERT_TRUE(feId != INVALID_ID);
    ASSERT_TRUE(feId != INVALID_ID);
@@ -531,6 +543,8 @@ TEST_P(TunerDescramblerHidlTest, CreateDescrambler) {
    uint32_t demuxId;
    uint32_t demuxId;
    sp<IDemux> demux;
    sp<IDemux> demux;
    mFrontendTests.getFrontendIdByType(frontendArray[defaultFrontend].type, feId);
    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(feId != INVALID_ID);
    ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
    ASSERT_TRUE(mFrontendTests.openFrontendById(feId));
    ASSERT_TRUE(mFrontendTests.setFrontendCallback());
    ASSERT_TRUE(mFrontendTests.setFrontendCallback());