blob: bce711adb48ba77727c60d499302870bf099a83e [file] [log] [blame]
Alan Viverettec15ea9f2015-08-26 16:33:17 -04001* Copyright (C) 2015 The Android Open Source Project
2*
3* Licensed under the Apache License, Version 2.0 (the "License");
4* you may not use this file except in compliance with the License.
5* You may obtain a copy of the License at
6*
7* http://www.apache.org/licenses/LICENSE-2.0
8*
9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14
15
16INTRODUCTION
17
18The Android theme tests ensure that the Holo and Material themes have not been
19modified. They consist of API-specific sets of reference images representing
20specific themes and widgets that must be identical across devices. To pass the
21theme tests, a device must be able to generate images that are identical to the
22reference images.
23
24NOTE: Reference images should only be updated by the CTS test maintainers. Any
25 modifications to the reference images will invalidate the test results.
26
27
28INSTRUCTIONS
29
30I. Generating reference images (CTS maintainers only)
31
32Reference images are typically only generated for new API revisions. To
33generate a new set of reference images, do the following:
34
35 1. Connect one device for each DPI bucket (ldpi, xxxhdpi, etc.) that you wish
36 to generate references images for. Confirm that all devices are connected
37 with:
38
39 adb devices
40
41 2. Image generation occurs on all devices in parallel. Resulting sets of
42 reference images are saved in assets/<api>/<dpi>.zip and will overwrite
43 any existing sets. Image generation may be started using:
44
45 .cts/hostsidetests/theme/generate_images.sh
46
47A complete collection of reference images for a given API revision must include
48a set for each possible DPI bucket (tvdpi, xxhdpi, etc.) that may be tested.
49
50
51II. Building theme tests
52
531. If you have not already built the CTS tests, run an initial make:
54
55 make cts -j32
56
572. Subsequent changes to the theme tests, including changes to the reference
58 images, may be built using mmm:
59
60 mmm cts/hostsidetests/theme -j32
61
62
63III. Running theme tests
64
651. Connect the device that you wish to test. Confirm that is is connected with:
66
67 adb devices
68
692. Run the theme tests using cts-tradefed:
70
71 cts-tradefed run cts -c android.theme.cts.ThemeHostTest
72
733. Wait for the tests to complete. This should take less than five minutes.