We added the functionality in CTS that can make the media test modules to run by:
- Loading the content on a device under test (DUT) SD card.
- Hosting the media files on the local server for CTS.
- Hosting the media files on the host machine used to execute test suites.
CTS can connect to partner, local, or third-party servers. CTS can't connect to Google servers.
Downloads
The downloads files are available as shown below.
For Android 11
- CTS Media 1.5
- CtsMediaTestCases
- CtsMediaStressTestCases
- CtsMediaBitstreamsTestCases
For Android 12 and above
- CTS Media 1.5
- CtsMediaStressTestCases
- CtsMediaBitstreamsTestCases
- CTS Media 1.4
- CtsMediaTestCases
Set up CTS media tests
- Unzip the downloaded contents of android-cts-media-1.5.zip in the android-cts-media-1.5 folder.
- Unzip the downloaded contents of CtsMediaTestCases.zip media files in the CtsMediaTestCases folder.
The
CtsMediaTestCases
module supports the SD card method and the local server hosting
method.
SD card method (for CtsMediaTestCases only)
Copy the files onto the device SD card and run the module using the following command.
$adb push CtsMediaTestCases /sdcard/
Local server method (for CtsMediaTestCases only)
- (Optional) Host DynamicConfig.json on local server.
- Have a local server with https enabled with a valid CA certificate and non-authenticated. For example, https://example.com.
- Host the media files on that server and get the URL.
- Modify DynamicConfig.json and host it on same location. For example, https://example.com/a/b/DynamicConfig.json).
Host machine method (for all three modules)
Move android-cts-media-1.5 folder in the /tmp/ folder of the host machine.
Run CTS media tests
SD card method (for CtsMediaTestCases only)
Single module run
$run cts -m CtsMediaTestCases --dynamic-config-url https://storage.googleapis.com/cts_media/DynamicConfig_local.json --shard-count 6
This downloads the files from the images
folder on dl.google.com
.
If you want to use the local images
folder from
android-cts-media-1.5.zip
, use this:
$run cts -m CtsMediaTestCases --module-arg CtsMediaTestCases:config-url:https://storage.googleapis.com/cts_media/DynamicConfig_local.json --module-arg CtsMediaTestCases:local-media-path:/tmp/android-cts-media-1.5 --shard-count 6
Full CTS run (CtsMediaTestCases on SD card)
$run cts --module-arg CtsMediaTestCases:config-url:https://storage.googleapis.com/cts_media/DynamicConfig_local.json --module-arg CtsMediaTestCases:local-media-path:/tmp/android-cts-media-1.5 --shard-count 6
Local server method
You may replace the default JSON config path with your custom local server path.
Single module run
$run cts -m CtsMediaTestCases --dynamic-config-url https://storage.googleapis.com/cts_media/DynamicConfig.json
This downloads the files from the images
folder on dl.google.com
.
If you want to use the local images
folder from
android-cts-media-1.5.zip
, use this:
$run cts -m CtsMediaTestCases --module-arg CtsMediaTestCases:config-url:https://storage.googleapis.com/cts_media/DynamicConfig.json --module-arg CtsMediaTestCases:local-media-path:/tmp/android-cts-media-1.5 --shard-count 6
Full CTS run (CtsMediaTestCases on SD card)
$run cts --module-arg CtsMediaTestCases:config-url:https://storage.googleapis.com/cts_media/DynamicConfig.json --module-arg CtsMediaTestCases:local-media-path:/tmp/android-cts-media-1.5 --shard-count 6
Host machine method
You can run the CTS media tests for all three modules on the host machine.
Run modules individually or together
Run the following command to run the modules individually.
$run cts -m CtsMediaTestCases --module-arg CtsMediaTestCases:local-media-path:/tmp/android-cts-media-1.5 --shard-count 6
Run the following command to run all the modules together.
$run cts --include-filter CtsMediaTestCases --module-arg CtsMediaTestCases:local-media-path:/tmp/android-cts-media-1.5 --include-filter CtsMediaStressTestCases --module-arg CtsMediaStressTestCases:local-media-path:/tmp/android-cts-media-1.5 --include-filter CtsMediaBitstreamsTestCases --module-arg CtsMediaBitstreamsTestCases:local-media-path:/tmp/android-cts-media-1.5 --shard-count 6
Full CTS run (with individual module parameters)
$run cts --module-arg CtsMediaTestCases:local-media-path:/tmp/android-cts-media-1.5 --module-arg CtsMediaStressTestCases:local-media-path:/tmp/android-cts-media-1.5 --module-arg CtsMediaBitstreamsTestCases:local-media-path:/tmp/android-cts-media-1.5 --shard-count 6