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