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

Commit 708a5b50 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Backporting Tuner VTS 1.0 test assets pusher and test enhancement" into android11-tests-dev

parents 85c1b4a2 7402e02e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,10 @@ cc_test {
    shared_libs: [
        "libbinder",
    ],
    data: [
        ":tuner_frontend_input_ts",
        ":tuner_frontend_input_es",
    ],
    test_suites: [
        "general-tests",
        "vts",
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<configuration description="Runs VtsHalTvTunerV1_0TargetTest.">
    <option name="test-suite-tag" value="apct" />
    <option name="test-suite-tag" value="apct-native" />

    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
        <option name="cleanup" value="true" />
        <option name="push" value="VtsHalTvTunerV1_0TargetTest->/data/local/tmp/VtsHalTvTunerV1_0TargetTest" />
        <option name="push" value="test.es->/data/local/tmp/test.es" />
        <option name="push" value="segment000000.ts->/data/local/tmp/segment000000.ts" />
    </target_preparer>

    <test class="com.android.tradefed.testtype.GTest" >
        <option name="native-test-device-path" value="/data/local/tmp" />
        <option name="module-name" value="VtsHalTvTunerV1_0TargetTest" />
    </test>
</configuration>
+2 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ void DvrCallback::playbackThreadLoop() {
    uint8_t* buffer;
    ALOGW("[vts] playback thread loop start %s", mInputDataFile.c_str());
    if (fd < 0) {
        EXPECT_TRUE(fd >= 0) << "Failed to open: " + mInputDataFile;
        mPlaybackThreadRunning = false;
        ALOGW("[vts] Error %s", strerror(errno));
    }
@@ -178,7 +179,7 @@ void DvrCallback::recordThreadLoop(RecordSettings* /*recordSettings*/, bool* kee
            // Our current implementation filter the data and write it into the filter FMQ
            // immediately after the DATA_READY from the VTS/framework
            if (!readRecordFMQ()) {
                ALOGD("[vts] record data failed to be filtered. Ending thread");
                ALOGW("[vts] record data failed to be filtered. Ending thread");
                mRecordThreadRunning = false;
                break;
            }
+15 −9
Original line number Diff line number Diff line
@@ -70,6 +70,10 @@ void FilterCallback::filterThreadLoop(DemuxFilterEvent& /* event */) {
}

bool FilterCallback::readFilterEventData() {
    if (mFilterMQ == NULL) {
        ALOGW("[vts] FMQ is not configured and does not need to be tested.");
        return true;
    }
    bool result = false;
    DemuxFilterEvent filterEvent = mFilterEvent;
    ALOGW("[vts] reading from filter FMQ or buffer %d", mFilterId);
@@ -218,7 +222,11 @@ AssertionResult FilterTests::configFilter(DemuxFilterSettings setting, uint32_t
    return AssertionResult(status == Result::SUCCESS);
}

AssertionResult FilterTests::getFilterMQDescriptor(uint32_t filterId) {
AssertionResult FilterTests::getFilterMQDescriptor(uint32_t filterId, bool getMqDesc) {
    if (!getMqDesc) {
        ALOGE("[vts] Filter does not need FMQ.");
        return success();
    }
    Result status;
    EXPECT_TRUE(mFilters[filterId]) << "Test with getNewlyOpenedFilterId first.";
    EXPECT_TRUE(mFilterCallbacks[filterId]) << "Test with getNewlyOpenedFilterId first.";
@@ -279,7 +287,6 @@ AssertionResult FilterTests::clearTimeStamp() {
AssertionResult FilterTests::closeFilter(uint32_t filterId) {
    EXPECT_TRUE(mFilters[filterId]) << "Test with getNewlyOpenedFilterId first.";
    Result status = mFilters[filterId]->close();
    if (status == Result::SUCCESS) {
    for (int i = 0; i < mUsedFilterIds.size(); i++) {
        if (mUsedFilterIds[i] == filterId) {
            mUsedFilterIds.erase(mUsedFilterIds.begin() + i);
@@ -288,7 +295,6 @@ AssertionResult FilterTests::closeFilter(uint32_t filterId) {
    }
    mFilterCallbacks.erase(filterId);
    mFilters.erase(filterId);
    }
    return AssertionResult(status == Result::SUCCESS);
}

+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ class FilterTests {
    AssertionResult getTimeStamp();
    AssertionResult getNewlyOpenedFilterId(uint32_t& filterId);
    AssertionResult configFilter(DemuxFilterSettings setting, uint32_t filterId);
    AssertionResult getFilterMQDescriptor(uint32_t filterId);
    AssertionResult getFilterMQDescriptor(uint32_t filterId, bool getMqDesc);
    AssertionResult setFilterDataSource(uint32_t sourceFilterId, uint32_t sinkFilterId);
    AssertionResult setFilterDataSourceToDemux(uint32_t filterId);
    AssertionResult startFilter(uint32_t filterId);
Loading