Ang Li | 9342000 | 2016-05-10 19:11:44 -0700 | [diff] [blame] | 1 | #!/usr/bin/env python3.4 |
| 2 | # |
| 3 | # Copyright 2016 - The Android Open Source Project |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
Ang Li | 9342000 | 2016-05-10 19:11:44 -0700 | [diff] [blame] | 17 | """This module has the global key values that are used across framework |
| 18 | modules. |
| 19 | """ |
Ang Li | e2139f1 | 2016-05-12 17:39:06 -0700 | [diff] [blame] | 20 | |
| 21 | |
Ang Li | 6492027 | 2016-05-26 18:37:43 -0700 | [diff] [blame] | 22 | class ConfigKeys(object): |
Ang Li | 9342000 | 2016-05-10 19:11:44 -0700 | [diff] [blame] | 23 | """Enum values for test config related lookups. |
| 24 | """ |
| 25 | # Keys used to look up values from test config files. |
| 26 | # These keys define the wording of test configs and their internal |
| 27 | # references. |
Keun Soo Yim | f43b2fb | 2016-07-25 16:56:36 -0700 | [diff] [blame] | 28 | KEY_LOG_PATH = "log_path" |
Ang Li | 9342000 | 2016-05-10 19:11:44 -0700 | [diff] [blame] | 29 | KEY_TESTBED = "test_bed" |
| 30 | KEY_TESTBED_NAME = "name" |
| 31 | KEY_TEST_PATHS = "test_paths" |
| 32 | |
| 33 | # Internal keys, used internally, not exposed to user's config files. |
| 34 | IKEY_USER_PARAM = "user_params" |
| 35 | IKEY_TESTBED_NAME = "testbed_name" |
Keun Soo Yim | b3bee69 | 2016-07-27 13:14:48 -0700 | [diff] [blame] | 36 | IKEY_LOG_PATH = "log_path" |
Keun Soo Yim | f43b2fb | 2016-07-25 16:56:36 -0700 | [diff] [blame] | 37 | |
| 38 | IKEY_BUILD = "build" |
| 39 | IKEY_DATA_FILE_PATH = "data_file_path" |
Ang Li | 9342000 | 2016-05-10 19:11:44 -0700 | [diff] [blame] | 40 | |
Keun Soo Yim | 5cb5e74 | 2016-07-28 20:21:18 -0700 | [diff] [blame] | 41 | # sub fields of test_bed |
| 42 | IKEY_PRODUCT_TYPE = "product_type" |
| 43 | IKEY_PRODUCT_VARIANT = "product_variant" |
| 44 | IKEY_BUILD_FLAVOR = "build_flavor" |
| 45 | IKEY_BUILD_ID = "build_id" |
| 46 | IKEY_BRANCH = "branch" |
| 47 | IKEY_BUILD_ALIAS = "build_alias" |
| 48 | IKEY_API_LEVEL = "api_level" |
| 49 | IKEY_SERIAL = "serial" |
| 50 | |
Ang Li | 9342000 | 2016-05-10 19:11:44 -0700 | [diff] [blame] | 51 | # A list of keys whose values in configs should not be passed to test |
| 52 | # classes without unpacking first. |
Keun Soo Yim | f43b2fb | 2016-07-25 16:56:36 -0700 | [diff] [blame] | 53 | RESERVED_KEYS = (KEY_TESTBED, KEY_LOG_PATH, KEY_TEST_PATHS) |