Merge "Mp3DecoderTest: Added AndroidTest.xml to run test with atest" am: bbec841b51 am: b2c2f43f34

Change-Id: I17bc3689c5407c499e71d645142a2c7fdbaa2826
gugelfrei
Automerger Merge Worker 4 years ago
commit 0a11ff11c0

@ -0,0 +1,31 @@
<?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 Mp3 Decoder unit test">
<option name="test-suite-tag" value="Mp3DecoderTest" />
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="push" value="Mp3DecoderTest->/data/local/tmp/Mp3DecoderTest" />
<option name="push-file"
key="https://storage.googleapis.com/android_media/frameworks/av/media/libstagefright/mp3dec/test/Mp3DecoderTest.zip?unzip=true"
value="/data/local/tmp/Mp3DecoderTestRes/" />
</target_preparer>
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp" />
<option name="module-name" value="Mp3DecoderTest" />
<option name="native-test-flag" value="-P /data/local/tmp/Mp3DecoderTestRes/" />
</test>
</configuration>

@ -22,13 +22,18 @@ To test 32-bit binary push binaries from nativetest.
adb push ${OUT}/data/nativetest/Mp3DecoderTest/Mp3DecoderTest /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.
Download mp3 folder and push all the files in this folder to /data/local/tmp/ on the device.
The resource file for the tests is taken from [here](https://storage.googleapis.com/android_media/frameworks/av/media/libstagefright/mp3dec/test/Mp3DecoderTest.zip). Download, unzip and push these files into device for testing.
```
adb push mp3/. /data/local/tmp/
adb push Mp3DecoderTestRes/. /data/local/tmp/
```
usage: Mp3DecoderTest -P \<path_to_folder\>
```
adb shell /data/local/tmp/Mp3DecoderTest -P /data/local/tmp/
adb shell /data/local/tmp/Mp3DecoderTest -P /data/local/tmp/Mp3DecoderTestRes/
```
Alternatively, the test can also be run using atest command.
```
atest Mp3DecoderTest -- --enable-module-dynamic-download=true
```

Loading…
Cancel
Save