• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2016 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16"""This module has the global key values that are used across framework
17modules.
18"""
19
20
21class ConfigKeys(object):
22    """Enum values for test config related lookups.
23    """
24    # Keys used to look up values from test config files.
25    # These keys define the wording of test configs and their internal
26    # references.
27    KEY_LOG_PATH = "log_path"
28    KEY_TESTBED = "test_bed"
29    KEY_TESTBED_NAME = "name"
30    KEY_TEST_PATHS = "test_paths"
31    KEY_TEST_SUITE = "test_suite"
32    KEY_TEST_MAX_TIMEOUT = "test_max_timeout"
33
34    # Keys in test suite
35    KEY_INCLUDE_FILTER = "include_filter"
36    KEY_EXCLUDE_FILTER = "exclude_filter"
37    KEY_EXCLUDE_OVER_INCLUDE = "exclude_over_include"
38
39    # Keys for binary tests
40    IKEY_BINARY_TEST_SOURCE = "binary_test_source"
41    IKEY_BINARY_TEST_WORKING_DIRECTORY = "binary_test_working_directory"
42    IKEY_BINARY_TEST_ENVP = "binary_test_envp"
43    IKEY_BINARY_TEST_ARGS = "binary_test_args"
44    IKEY_BINARY_TEST_LD_LIBRARY_PATH = "binary_test_ld_library_path"
45    IKEY_BINARY_TEST_DISABLE_FRAMEWORK = "binary_test_disable_framework"
46    IKEY_BINARY_TEST_STOP_NATIVE_SERVERS = "binary_test_stop_native_servers"
47    IKEY_NATIVE_SERVER_PROCESS_NAME = "native_server_process_name"
48    IKEY_GTEST_BATCH_MODE = "gtest_batch_mode"
49
50    # Internal keys, used internally, not exposed to user's config files.
51    IKEY_USER_PARAM = "user_params"
52    IKEY_TESTBED_NAME = "testbed_name"
53    IKEY_LOG_PATH = "log_path"
54    IKEY_ABI_NAME = "abi_name"
55    IKEY_ABI_BITNESS = "abi_bitness"
56    IKEY_RUN_32BIT_ON_64BIT_ABI = "run_32bit_on_64bit_abi"
57    IKEY_SKIP_ON_32BIT_ABI = "skip_on_32bit_abi"
58    IKEY_SKIP_ON_64BIT_ABI = "skip_on_64bit_abi"
59    IKEY_SKIP_IF_THERMAL_THROTTLING = "skip_if_thermal_throttling"
60
61    IKEY_BUILD = "build"
62    IKEY_DATA_FILE_PATH = "data_file_path"
63
64    IKEY_BUG_REPORT_ON_FAILURE = "bug_report_on_failure"
65
66    # sub fields of test_bed
67    IKEY_ANDROID_DEVICE = "AndroidDevice"
68    IKEY_PRODUCT_TYPE = "product_type"
69    IKEY_PRODUCT_VARIANT = "product_variant"
70    IKEY_BUILD_FLAVOR = "build_flavor"
71    IKEY_BUILD_ID = "build_id"
72    IKEY_BRANCH = "branch"
73    IKEY_BUILD_ALIAS = "build_alias"
74    IKEY_API_LEVEL = "api_level"
75    IKEY_SERIAL = "serial"
76
77    # Keys for web
78    IKEY_ENABLE_WEB = "enable_web"
79
80    # Keys for profiling
81    IKEY_ENABLE_PROFILING = "enable_profiling"
82    IKEY_BINARY_TEST_PROFILING_LIBRARY_PATH = "binary_test_profiling_library_path"
83    IKEY_PROFILING_TRACING_PATH = "profiling_trace_path"
84    IKEY_TRACE_FILE_TOOL_NAME = "trace_file_tool_name"
85    IKEY_SAVE_TRACE_FILE_REMOTE = "save_trace_file_remote"
86
87    # Keys for systrace (for hal tests)
88    IKEY_ENABLE_SYSTRACE = "enable_systrace"
89    IKEY_SYSTRACE_PROCESS_NAME = "systrace_process_name"
90    IKEY_SYSTRACE_REPORT_PATH = "systrace_report_path"
91    IKEY_SYSTRACE_REPORT_URL_PREFIX = "systrace_report_url_prefix"
92    IKEY_SYSTRACE_REPORT_USE_DATE_DIRECTORY = "systrace_report_path_use_date_directory"
93    IKEY_SYSTRACE_UPLAD_TO_DASHBOARD = "systrace_upload_to_dashboard"
94
95    # Keys for coverage
96    IKEY_ENABLE_COVERAGE = "enable_coverage"
97    IKEY_MODULES = "modules"
98    IKEY_SERVICE_JSON_PATH = "service_key_json_path"
99    IKEY_DASHBOARD_POST_COMMAND = "dashboard_post_command"
100    IKEY_OUTPUT_COVERAGE_REPORT = "output_coverage_report"
101    IKEY_GLOBAL_COVERAGE = "global_coverage"
102
103    # Keys for the HAL HIDL GTest type (see VtsMultiDeviceTest.java).
104    IKEY_PRECONDITION_HWBINDER_SERVICE = "precondition_hwbinder_service"
105    IKEY_PRECONDITION_FEATURE = "precondition_feature"
106    IKEY_PRECONDITION_FILE_PATH_PREFIX = "precondition_file_path_prefix"
107    IKEY_PRECONDITION_LSHAL = "precondition_lshal"
108    IKEY_PRECONDITION_VINTF = "precondition_vintf"
109
110    # Keys for toggle passthrough mode
111    IKEY_PASSTHROUGH_MODE = "passthrough_mode"
112
113    # Keys for the HAL HIDL Replay Test type.
114    IKEY_HAL_HIDL_REPLAY_TEST_TRACE_PATHS = "hal_hidl_replay_test_trace_paths"
115    IKEY_HAL_HIDL_PACKAGE_NAME = "hal_hidl_package_name"
116
117    # Keys for special test cases
118    IKEY_FFMPEG_BINARY_PATH = "ffmpeg_binary_path"
119
120    # Keys for log uploading
121    IKEY_ENABLE_LOG_UPLOADING = "enable_log_uploading"
122    IKEY_LOG_UPLOADING_PATH = "log_uploading_path"
123    IKEY_LOG_UPLOADING_USE_DATE_DIRECTORY = "log_uploading_use_date_directory"
124    IKEY_LOG_UPLOADING_URL_PREFIX = "log_uploading_url_prefix"
125
126    # A list of keys whose values in configs should not be passed to test
127    # classes without unpacking first.
128    RESERVED_KEYS = (KEY_TESTBED, KEY_LOG_PATH, KEY_TEST_PATHS)
129