README.md
1## Media Performance Class CTS Tests
2Current folder comprises of files necessary for testing media performance class.
3
4The test vectors used by the test suite is available at [link](https://dl.google.com/android/xts/cts/tests/mediapc/CtsMediaPerformanceClassTestCases-3.0.zip) and is downloaded automatically while running tests. Manual installation of these can be done using copy_media.sh script in this directory.
5
6### Commands
7#### To run all tests in CtsMediaPerformanceClassTestCases
8```sh
9$ atest CtsMediaPerformanceClassTestCases
10```
11#### To run a subset of tests in CtsMediaPerformanceClassTestCases
12```sh
13$ atest CtsMediaPerformanceClassTestCases:android.mediapc.cts.FrameDropTest
14```
15#### To run all tests in CtsMediaPerformanceClassTestCases by overriding Build.VERSION.MEDIA_PERFORMANCE_CLASS
16In some cases it might be useful to override Build.VERSION.MEDIA_PERFORMANCE_CLASS and run the tests.
17For eg: when the device doesn't advertise Build.VERSION.MEDIA_PERFORMANCE_CLASS, running the tests by overriding
18this will help in determining the which performance class requirements are met by the device.
19Following runs the tests by overriding Build.VERSION.MEDIA_PERFORMANCE_CLASS as S.
20```sh
21$ atest CtsMediaPerformanceClassTestCases -- --module-arg CtsMediaPerformanceClassTestCases:instrumentation-arg:media-performance-class:=31
22```
23
24### Features
25All tests accepts attributes that offer selective run of tests.
26
27
28#### Select codecs by media type
29To select codecs by media type, *media-type-prefix* can be passed to media codec tests to select one or more codecs that start with a given prefix.
30
31Example: To limit the tests to run for media types whose names start with video/avc
32
33```sh
34atest CtsMediaPerformanceClassTestCases -- --module-arg CtsMediaPerformanceClassTestCases:instrumentation-arg:media-type-prefix:=video/avc
35```
36#### Select codecs using regular expressions
37To select codecs by applying regular expressions, *codec-filter* can be passed to media codec tests to select one or more codecs that match with a specified regular expression pattern.
38
39Example: To limit the tests to run for c2.android.avc.decoder and c2.android.hevc.encoder
40
41```sh
42atest CtsMediaPerformanceClassTestCases -- --module-arg CtsMediaPerformanceClassTestCases:instrumentation-arg:codec-filter:="c2\.android\.avc\.decoder\|c2\.android\.hevc\.encoder"
43```
44
45#### Select codecs by name
46To select codecs by name, *codec-prefix* can be passed to media codec tests to select one or more codecs that start with a given prefix.
47
48Example: To limit the tests to run for codecs whose names start with c2.android.
49
50```sh
51atest CtsMediaPerformanceClassTestCases -- --module-arg CtsMediaPerformanceClassTestCases:instrumentation-arg:codec-prefix:=c2.android.
52```
53
54Example: To limit the tests to run for c2.android.hevc.decoder
55
56```sh
57atest CtsMediaPerformanceClassTestCases -- --module-arg CtsMediaPerformanceClassTestCases:instrumentation-arg:codec-prefix:=c2.android.hevc.decoder
58```