From 0e1fdeed217c7201afc18043147356dd89384565 Mon Sep 17 00:00:00 2001 From: Harish Mahendrakar Date: Tue, 17 Oct 2023 17:02:58 +0000 Subject: [PATCH] AvcEncTest: Use MediaPreparer to download test files Test: atest AvcEncTest --- tests/AndroidTest.xml | 16 +++++++++++----- tests/DynamicConfig.xml | 20 ++++++++++++++++++++ tests/README.md | 10 +++++----- 3 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 tests/DynamicConfig.xml diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml index 36d240d1..9b8d81a7 100644 --- a/tests/AndroidTest.xml +++ b/tests/AndroidTest.xml @@ -18,14 +18,20 @@ - + + + + diff --git a/tests/DynamicConfig.xml b/tests/DynamicConfig.xml new file mode 100644 index 00000000..4d721cf6 --- /dev/null +++ b/tests/DynamicConfig.xml @@ -0,0 +1,20 @@ + + + + + https://storage.googleapis.com/android_media/external/libavc/tests/AvcTestRes-1.0.zip + + diff --git a/tests/README.md b/tests/README.md index 43aa2db0..7832d5af 100644 --- a/tests/README.md +++ b/tests/README.md @@ -35,7 +35,7 @@ Optionally, enable sanitizers by passing -DSANITIZE $ make ``` -The media files for the tests are present [at](https://storage.googleapis.com/android_media/external/libavc/tests/AvcEncoder.zip). +The media files for the tests are present [at](https://storage.googleapis.com/android_media/external/libavc/tests/AvcTestRes-1.0.zip). Download and extract these the current folder. usage: AvcEncTest -P \ @@ -61,20 +61,20 @@ To test 32-bit binary push binaries from nativetest. adb push ${OUT}/data/nativetest/AvcEncTest/AvcEncTest /data/local/tmp/ ``` -The resource file for the tests is taken from [here](https://storage.googleapis.com/android_media/external/libavc/tests/AvcEncoder.zip) +The resource file for the tests is taken from [here](https://storage.googleapis.com/android_media/external/libavc/tests/AvcTestRes-1.0.zip) Download, unzip and push these files into device for testing. ``` -adb push AvcEncoder/. /data/local/tmp/ +adb push AvcTestRes-1.0 /sdcard/test/ ``` usage: AvcEncTest -P \ ``` -adb shell /data/local/tmp/AvcEncTest -P /data/local/tmp/ +adb shell /data/local/tmp/AvcEncTest -P /sdcard/test/AvcTestRes-1.0/ ``` Alternatively, the test can also be run using atest command. ``` -atest AvcEncTest -- --enable-module-dynamic-download=true +atest AvcEncTest ```