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

Commit e852ece3 authored by Amy Zhang's avatar Amy Zhang
Browse files

Add Tuner VTS test assets and configure the push file preparer

Test: atest VtsHalTvTunerV1_0TargetTest
Test: atest VtsHalTvTunerV1_1TargetTest
Bug: 161745584
Change-Id: I5fe55bc846ef8b4b3336ea65b2efb63c2de829ac
parent 897077a7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ cc_test {
    shared_libs: [
        "libbinder",
    ],
    data: [
        ":tuner_frontend_input_ts",
    ],
    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
@@ -165,8 +165,9 @@ Return<Result> Filter::flush() {
Return<Result> Filter::releaseAvHandle(const hidl_handle& avMemory, uint64_t avDataId) {
    ALOGV("%s", __FUNCTION__);

    if ((avMemory.getNativeHandle()->numFds > 0) &&
    if (mSharedAvMemHandle != NULL && avMemory != NULL &&
        (mSharedAvMemHandle.getNativeHandle()->numFds > 0) &&
        (avMemory.getNativeHandle()->numFds > 0) &&
        (sameFile(avMemory.getNativeHandle()->data[0],
                  mSharedAvMemHandle.getNativeHandle()->data[0]))) {
        freeSharedAvHandle();
+3 −0
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@ cc_test {
    shared_libs: [
        "libbinder",
    ],
    data: [
        ":tuner_frontend_input_es",
    ],
    test_suites: [
        "general-tests",
        "vts",
+33 −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_1TargetTest.">
    <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_1TargetTest->/data/local/tmp/VtsHalTvTunerV1_1TargetTest" />
        <option name="push" value="test.es->/data/local/tmp/test.es" />
    </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_1TargetTest" />
    </test>
</configuration>
Loading