summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-10-04 23:40:29 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-04 23:40:29 +0000
commit1478f9b3a699c9b795ed0248f166d92fe92c8e4f (patch)
tree008a5b0f96323878d135caafab24c96642cfa5a8
parent6697d689b5dd3ee59acdf56ce28fdcf3aa5da3e6 (diff)
parent8edbdb706e1fa2e1c63c40ac48ac435d926d3991 (diff)
downloadsonivox-1478f9b3a699c9b795ed0248f166d92fe92c8e4f.tar.gz
Merge "SonivoxTest: Use MediaPreparer to download test files" into main am: 5e9ae01ee1 am: 40c2ce9eb4 am: 1570e53606 am: 8edbdb706e
Original change: https://android-review.googlesource.com/c/platform/external/sonivox/+/2773024 Change-Id: I30a95818669532becde7937226da552b7c322361 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--test/AndroidTest.xml15
-rw-r--r--test/DynamicConfig.xml20
-rw-r--r--test/README.md6
3 files changed, 34 insertions, 7 deletions
diff --git a/test/AndroidTest.xml b/test/AndroidTest.xml
index 17a36bd..57fde9e 100644
--- a/test/AndroidTest.xml
+++ b/test/AndroidTest.xml
@@ -18,13 +18,20 @@
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="push" value="SonivoxTest->/data/local/tmp/SonivoxTest" />
- <option name="push-file"
- key="https://storage.googleapis.com/android_media/external/sonivox/test/SonivoxTestRes-1.0.zip?unzip=true"
- value="/data/local/tmp/SonivoxTestRes/" />
+ </target_preparer>
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.DynamicConfigPusher">
+ <option name="target" value="host" />
+ <option name="config-filename" value="SonivoxTest" />
+ <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="SonivoxTestRes-1.0"/>
+ <option name="dynamic-config-module" value="SonivoxTest" />
</target_preparer>
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp" />
<option name="module-name" value="SonivoxTest" />
- <option name="native-test-flag" value="-P /data/local/tmp/SonivoxTestRes/" />
+ <option name="native-test-flag" value="-P /sdcard/test/SonivoxTestRes-1.0/" />
</test>
</configuration>
diff --git a/test/DynamicConfig.xml b/test/DynamicConfig.xml
new file mode 100644
index 0000000..ea28605
--- /dev/null
+++ b/test/DynamicConfig.xml
@@ -0,0 +1,20 @@
+<!-- Copyright (C) 2023 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://dl.google.com/android-unittest/media/external/sonivox/test/SonivoxTestRes-1.0.zip</value>
+ </entry>
+</dynamicConfig>
diff --git a/test/README.md b/test/README.md
index 9c0eed3..9232b24 100644
--- a/test/README.md
+++ b/test/README.md
@@ -22,15 +22,15 @@ To test 32-bit binary push binaries from nativetest.
adb push ${OUT}/data/nativetest/SonivoxTest/SonivoxTest /data/local/tmp/
```
-The resource file for the tests is taken from [here](https://storage.googleapis.com/android_media/external/sonivox/test/SonivoxTestRes-1.0.zip). Download, unzip and push these files into device for testing.
+The resource file for the tests is taken from [here](https://dl.google.com/android-unittest/media/external/sonivox/test/SonivoxTestRes-1.0.zip). Download, unzip and push these files into device for testing.
```
-adb push SonivoxTestRes-1.0/. /data/local/tmp/SonivoxTestRes/
+adb push SonivoxTestRes-1.0 /sdcard/test/
```
usage: SonivoxTest -P \<path_to_res_folder\> -C <remove_output_file>
```
-adb shell /data/local/tmp/SonivoxTest -P /data/local/tmp/SonivoxTestRes/ -C true
+adb shell /data/local/tmp/SonivoxTest -P /sdcard/test/SonivoxTestRes-1.0/ -C true
```
Alternatively, the test can also be run using atest command.