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

Commit 97a60ebf authored by Ruchika Ashtankar's avatar Ruchika Ashtankar
Browse files

AmrnbDecoderTest: Added AndroidTest.xml to run test with atest

Bug: 145341631

Test: atest AmrnbDecoderTest -- --enable-module-dynamic-download=true

Change-Id: I795aa2eaa96d247ec3652f2e1a845e1160aefbe1
parent 29d260f6
Loading
Loading
Loading
Loading
+31 −0
Original line number Original line 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="Test module config for Amr-nb Decoder unit test">
    <option name="test-suite-tag" value="AmrnbDecoderTest" />
    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
        <option name="cleanup" value="true" />
        <option name="push" value="AmrnbDecoderTest->/data/local/tmp/AmrnbDecoderTest" />
        <option name="push-file"
            key="https://storage.googleapis.com/android_media/frameworks/av/media/libstagefright/codecs/amrnb/dec/test/AmrnbDecoderTest.zip?unzip=true"
            value="/data/local/tmp/AmrnbDecoderTestRes/" />
    </target_preparer>

    <test class="com.android.tradefed.testtype.GTest" >
        <option name="native-test-device-path" value="/data/local/tmp" />
        <option name="module-name" value="AmrnbDecoderTest" />
        <option name="native-test-flag" value="-P /data/local/tmp/AmrnbDecoderTestRes/" />
    </test>
</configuration>
+9 −4
Original line number Original line Diff line number Diff line
@@ -22,13 +22,18 @@ To test 32-bit binary push binaries from nativetest.
adb push ${OUT}/data/nativetest/AmrnbDecoderTest/AmrnbDecoderTest /data/local/tmp/
adb push ${OUT}/data/nativetest/AmrnbDecoderTest/AmrnbDecoderTest /data/local/tmp/
```
```


The resource file for the tests is taken from [here](https://drive.google.com/drive/folders/13cM4tAaVFrmr-zGFqaAzFBbKs75pnm9b). Push these files into device for testing.
The resource file for the tests is taken from [here](https://storage.googleapis.com/android_media/frameworks/av/media/libstagefright/codecs/amrnb/dec/test/AmrnbDecoderTest.zip). Download, unzip and push these files into device for testing.
Download amr-nb folder and push all the files in this folder to /data/local/tmp/ on the device.

```
```
adb push amr-nb/. /data/local/tmp/
adb push AmrnbDecoderTestRes/. /data/local/tmp/
```
```


usage: AmrnbDecoderTest -P \<path_to_folder\>
usage: AmrnbDecoderTest -P \<path_to_folder\>
```
```
adb shell /data/local/tmp/AmrnbDecoderTest -P /data/local/tmp/
adb shell /data/local/tmp/AmrnbDecoderTest -P /data/local/tmp/AmrnbDecoderTestRes/
```
Alternatively, the test can also be run using atest command.

```
atest AmrnbDecoderTest -- --enable-module-dynamic-download=true
```
```