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

Commit 3138d6b7 authored by Frankie Lizcano's avatar Frankie Lizcano
Browse files

Improve Tuner VTS: Generate Scan Combos

This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the Scan dataflow, and runs the
integration tests with all valid frontends.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest. Manual
tests with different input configuration files.

Change-Id: Ic6756e284090fbd1961a9ed12c1a4b541fb834b8
parent 1e283b38
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -926,16 +926,24 @@ TEST_P(TunerFrontendAidlTest, AutoScanFrontend) {
    if (!scan.hasFrontendConnection) {
        return;
    }
    vector<ScanHardwareConnections> scan_configs = generateScanConfigurations();
    for (auto& configuration : scan_configs) {
        scan = configuration;
        mFrontendTests.scanTest(frontendMap[scan.frontendId], FrontendScanType::SCAN_AUTO);
    }
}

TEST_P(TunerFrontendAidlTest, BlindScanFrontend) {
    description("Run an blind frontend scan with specific setting and check lock scanMessage");
    if (!scan.hasFrontendConnection) {
        return;
    }
    vector<ScanHardwareConnections> scan_configs = generateScanConfigurations();
    for (auto& configuration : scan_configs) {
        scan = configuration;
        mFrontendTests.scanTest(frontendMap[scan.frontendId], FrontendScanType::SCAN_BLIND);
    }
}

TEST_P(TunerFrontendAidlTest, TuneFrontendWithFrontendSettings) {
    description("Tune one Frontend with setting and check Lock event");
@@ -950,8 +958,12 @@ TEST_P(TunerFrontendAidlTest, BlindScanFrontendWithEndFrequency) {
    if (!scan.hasFrontendConnection) {
        return;
    }
    vector<ScanHardwareConnections> scan_configs = generateScanConfigurations();
    for (auto& configuration : scan_configs) {
        scan = configuration;
        mFrontendTests.scanTest(frontendMap[scan.frontendId], FrontendScanType::SCAN_BLIND);
    }
}

TEST_P(TunerFrontendAidlTest, LinkToCiCam) {
    description("Test Frontend link to CiCam");
+27 −1
Original line number Diff line number Diff line
@@ -222,6 +222,32 @@ static inline vector<LnbLiveHardwareConnections> generateLnbLiveConfigurations()
    return lnbLive_configs;
}

static inline vector<ScanHardwareConnections> generateScanCombinations() {
    vector<ScanHardwareConnections> combinations;

    for (auto& id : frontendIds) {
        ScanHardwareConnections mScan;
        mScan.frontendId = id;
        combinations.push_back(mScan);
    }

    return combinations;
}

static inline vector<ScanHardwareConnections> generateScanConfigurations() {
    vector<ScanHardwareConnections> scan_configs;
    if (configuredScan) {
        ALOGD("Using scan configuration provided.");
        scan_configs = {scan};
    } else {
        ALOGD("Scan not provided. Generating possible combinations. Consider adding it to "
              "the configuration file.");
        scan_configs = generateScanCombinations();
    }

    return scan_configs;
}

/** Config all the frontends that would be used in the tests */
inline void initFrontendConfig() {
    // The test will use the internal default fe when default fe is connected to any data flow
@@ -417,8 +443,8 @@ inline void connectHardwaresToTestCases() {
    TunerTestingConfigAidlReader1_0::connectDvrRecord(record);
    TunerTestingConfigAidlReader1_0::connectTimeFilter(timeFilter);
    TunerTestingConfigAidlReader1_0::connectDescrambling(descrambling);
    TunerTestingConfigAidlReader1_0::connectLnbRecord(lnbRecord);
    TunerTestingConfigAidlReader1_0::connectLnbLive(lnbLive);
    TunerTestingConfigAidlReader1_0::connectLnbRecord(lnbRecord);
    TunerTestingConfigAidlReader1_0::connectDvrPlayback(playback);
};