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

Commit 51703503 authored by hkuang's avatar hkuang
Browse files

transcoding: Rework mediatranscoding test.

Create a sperate directory for all tests associated with
mediatranscoding.
This CL is a preparation of hooking with actual service,
adding perf benchamrk, power measurement.

Bug: 145628554
Test: MediaTranscodingTest.

Change-Id: Ifcdb26eae2e71599e2e19bb92b991f88809ec5e0
parent 16229130
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import com.android.mediaframeworktest.functional.CameraTest;
import com.android.mediaframeworktest.functional.MediaMetadataTest;
import com.android.mediaframeworktest.functional.MediaMimeTest;
import com.android.mediaframeworktest.functional.MediaPlayerInvokeTest;
import com.android.mediaframeworktest.functional.MediaTranscodeManagerTest;
import com.android.mediaframeworktest.functional.audio.MediaAudioEffectTest;
import com.android.mediaframeworktest.functional.audio.MediaAudioManagerTest;
import com.android.mediaframeworktest.functional.audio.MediaAudioTrackTest;
@@ -71,7 +70,6 @@ public class MediaFrameworkTestRunner extends InstrumentationTestRunner {
        suite.addTestSuite(MediaEnvReverbTest.class);
        suite.addTestSuite(MediaEqualizerTest.class);
        suite.addTestSuite(MediaPresetReverbTest.class);
        suite.addTestSuite(MediaTranscodeManagerTest.class);
        suite.addTestSuite(MediaVirtualizerTest.class);
        suite.addTestSuite(MediaVisualizerTest.class);
        return suite;
+15 −0
Original line number Diff line number Diff line
android_test {
    name: "mediatranscodingtest",
    srcs: ["**/*.java"],
    libs: [
        "android.test.runner",
        "android.test.base",
    ],
    static_libs: [
        "androidx.test.ext.junit",
        "androidx.test.rules",
        "android-support-test",
        "testng"
    ],
    platform_apis: true,
}
+40 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 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.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.mediatranscodingtest">

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>

    <application android:label="@string/app_name">
        <uses-library android:name="android.test.runner"/>
        <activity android:label="@string/app_name"
             android:name="MediaTranscodingTest"
             android:screenOrientation="landscape"
             android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

    <instrumentation android:name=".MediaTranscodingTestRunner"
         android:targetPackage="com.android.mediatranscodingtest"
         android:label="MediaTranscoding tests InstrumentationRunner">
    </instrumentation>
</manifest>
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 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 MediaTranscoding Tests">
    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
        <option name="test-file-name" value="mediatranscodingtest.apk" />
    </target_preparer>

    <option name="test-tag" value="MediaTranscodingTest" />
    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.mediatranscodingtest" />
        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
        <option name="hidden-api-checks" value="false"/>
    </test>
</configuration>
+8 −0
Original line number Diff line number Diff line
MediaTranscodingTest/
    Uses instrumentation and so can be run with runtest.
    It assumes /sdcard/media_api/ has been populated.

contents/media_api/
    Push to /sdcard/media_api/ for use with MediaTranscodingTest:
    adb shell mkdir /sdcard/media_api
    adb push contents/media_api/ /sdcard/media_api/
Loading