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

Commit aafb9118 authored by Ray Essick's avatar Ray Essick
Browse files

Convert MediaBenchmark to use MediaPreparer

Test assets are downloaded from a web site; use MediaPreparer to
specify and implement this. Stop using FilePusher as a way to retrieve
the assets.

Bug: 274674920
Test: atest MediaBenchmarkTest
Change-Id: Icd2dc9d03b980d91b90032c99a783f00933a8a3e
parent 12a7ed2f
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -14,18 +14,26 @@
     limitations under the License.
-->
<configuration description="Runs Media Benchmark Tests">
    <option name="test-tag" value="MediaBenchmarkTest" />
    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
        <option name="cleanup" value="true" />
        <option name="push-file"
            key="https://storage.googleapis.com/android_media/frameworks/av/media/tests/benchmark/MediaBenchmark.zip?unzip=true"
            value="/data/local/tmp/MediaBenchmark/res/" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
        <option name="cleanup-apks" value="false" />
    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.DynamicConfigPusher">
        <option name="target" value="host" />
        <option name="config-filename" value="MediaBenchmarkTest" />
        <option name="version" value="1.0"/>
    </target_preparer>
    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.MediaPreparer">
        <option name="push-all" value="true" />
        <option name="media-folder-name" value="MediaBenchmarkTest-1.1" />
        <option name="dynamic-config-module" value="MediaBenchmarkTest" />
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="MediaBenchmarkTest.apk" />
    </target_preparer>

    <option name="test-tag" value="MediaBenchmarkTest" />
    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.media.benchmark" />
        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
+20 −0
Original line number Diff line number Diff line
<!-- Copyright (C) 2021 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.
-->

<dynamicConfig>
    <entry key="media_files_url">
            <value>https://storage.googleapis.com/android_media/frameworks/av/media/tests/benchmark/MediaBenchmark-1.1.zip</value>
    </entry>
</dynamicConfig>
+1 −1
Original line number Diff line number Diff line
<resources>
    <string name="input_file_path">/data/local/tmp/MediaBenchmark/res/</string>
    <string name="input_file_path">/sdcard/test/MediaBenchmarkTest-1.1/</string>
    <string name="output_file_path">/data/local/tmp/MediaBenchmark/output/</string>
</resources>