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_LOG_SEVERITY = "log_severity" 29 KEY_TESTBED = "test_bed" 30 KEY_TESTBED_NAME = "name" 31 KEY_TEST_PATHS = "test_paths" 32 KEY_TEST_SUITE = "test_suite" 33 KEY_TEST_TIMEOUT = "test_timeout" 34 35 # Keys in test suite 36 KEY_INCLUDE_FILTER = "include_filter" 37 KEY_EXCLUDE_FILTER = "exclude_filter" 38 KEY_EXCLUDE_OVER_INCLUDE = "exclude_over_include" 39 40 # Keys for base test. 41 IKEY_MAX_RETRY_COUNT = "max_retry_count" 42 43 # Keys for binary tests 44 IKEY_BINARY_TEST_SOURCE = "binary_test_source" 45 IKEY_BINARY_TEST_WORKING_DIRECTORY = "binary_test_working_directory" 46 IKEY_BINARY_TEST_ENVP = "binary_test_envp" 47 IKEY_BINARY_TEST_ARGS = "binary_test_args" 48 IKEY_BINARY_TEST_LD_LIBRARY_PATH = "binary_test_ld_library_path" 49 IKEY_NATIVE_SERVER_PROCESS_NAME = "native_server_process_name" 50 IKEY_GTEST_BATCH_MODE = "gtest_batch_mode" 51 52 # @Deprecated use IKEY_DISABLE_FRAMEWORK 53 IKEY_BINARY_TEST_DISABLE_FRAMEWORK = "binary_test_disable_framework" 54 IKEY_DISABLE_FRAMEWORK = "DISABLE_FRAMEWORK" 55 # @Deprecated use IKEY_STOP_NATIVE_SERVERS 56 IKEY_BINARY_TEST_STOP_NATIVE_SERVERS = "binary_test_stop_native_servers" 57 IKEY_STOP_NATIVE_SERVERS = "STOP_NATIVE_SERVERS" 58 59 # Internal keys, used internally, not exposed to user's config files. 60 IKEY_USER_PARAM = "user_params" 61 IKEY_TESTBED_NAME = "testbed_name" 62 IKEY_LOG_PATH = "log_path" 63 IKEY_ABI_NAME = "abi_name" 64 IKEY_ABI_BITNESS = "abi_bitness" 65 IKEY_RUN_32BIT_ON_64BIT_ABI = "run_32bit_on_64bit_abi" 66 IKEY_SKIP_ON_32BIT_ABI = "skip_on_32bit_abi" 67 IKEY_SKIP_ON_64BIT_ABI = "skip_on_64bit_abi" 68 IKEY_SKIP_IF_THERMAL_THROTTLING = "skip_if_thermal_throttling" 69 IKEY_DISABLE_CPU_FREQUENCY_SCALING = "disable_cpu_frequency_scaling" 70 71 IKEY_BUILD = "build" 72 IKEY_DATA_FILE_PATH = "data_file_path" 73 74 IKEY_BUG_REPORT_ON_FAILURE = "BUG_REPORT_ON_FAILURE" 75 IKEY_LOGCAT_ON_FAILURE = "LOGCAT_ON_FAILURE" 76 77 # sub fields of test_bed 78 IKEY_ANDROID_DEVICE = "AndroidDevice" 79 IKEY_PRODUCT_TYPE = "product_type" 80 IKEY_PRODUCT_VARIANT = "product_variant" 81 IKEY_BUILD_FLAVOR = "build_flavor" 82 IKEY_BUILD_ID = "build_id" 83 IKEY_BRANCH = "branch" 84 IKEY_BUILD_ALIAS = "build_alias" 85 IKEY_API_LEVEL = "api_level" 86 IKEY_SERIAL = "serial" 87 88 # Keys for web 89 IKEY_ENABLE_WEB = "enable_web" 90 91 # Keys for profiling 92 IKEY_ENABLE_PROFILING = "enable_profiling" 93 IKEY_BINARY_TEST_PROFILING_LIBRARY_PATH = "binary_test_profiling_library_path" 94 IKEY_PROFILING_TRACING_PATH = "profiling_trace_path" 95 IKEY_TRACE_FILE_TOOL_NAME = "trace_file_tool_name" 96 IKEY_SAVE_TRACE_FILE_REMOTE = "save_trace_file_remote" 97 IKEY_PROFILING_ARG_VALUE = "profiling_arg_value" 98 99 # Keys for systrace (for hal tests) 100 IKEY_ENABLE_SYSTRACE = "enable_systrace" 101 IKEY_SYSTRACE_PROCESS_NAME = "systrace_process_name" 102 IKEY_SYSTRACE_REPORT_PATH = "systrace_report_path" 103 IKEY_SYSTRACE_REPORT_URL_PREFIX = "systrace_report_url_prefix" 104 IKEY_SYSTRACE_REPORT_USE_DATE_DIRECTORY = "systrace_report_path_use_date_directory" 105 IKEY_SYSTRACE_UPLAD_TO_DASHBOARD = "systrace_upload_to_dashboard" 106 107 # Keys for coverage 108 IKEY_ENABLE_COVERAGE = "enable_coverage" 109 IKEY_ENABLE_SANCOV = "enable_sancov" 110 IKEY_MODULES = "modules" 111 IKEY_SERVICE_JSON_PATH = "service_key_json_path" 112 IKEY_DASHBOARD_POST_COMMAND = "dashboard_post_command" 113 IKEY_OUTPUT_COVERAGE_REPORT = "output_coverage_report" 114 IKEY_GLOBAL_COVERAGE = "global_coverage" 115 IKEY_SANCOV_RESOURCES_PATH = "sancov_resources_path" 116 IKEY_GCOV_RESOURCES_PATH = "gcov_resources_path" 117 IKEY_COVERAGE_REPORT_PATH = "coverage_report_path" 118 IKEY_EXCLUDE_COVERAGE_PATH = "exclude_coverage_path" 119 IKEY_FUZZING_GCS_BUCKET_NAME = "fuzzing_gcs_bucket_name" 120 121 # Keys for the HAL HIDL GTest type (see VtsMultiDeviceTest.java). 122 IKEY_PRECONDITION_HWBINDER_SERVICE = "precondition_hwbinder_service" 123 IKEY_PRECONDITION_FEATURE = "precondition_feature" 124 IKEY_PRECONDITION_FILE_PATH_PREFIX = "precondition_file_path_prefix" 125 IKEY_PRECONDITION_FIRST_API_LEVEL = "precondition_first_api_level" 126 IKEY_PRECONDITION_LSHAL = "precondition_lshal" 127 IKEY_PRECONDITION_SYSPROP = "precondition_sysprop" 128 IKEY_PRECONDITION_VINTF = "precondition_vintf" 129 130 # Keys for toggle passthrough mode 131 IKEY_PASSTHROUGH_MODE = "passthrough_mode" 132 133 # Keys for the HAL HIDL Replay Test type. 134 IKEY_HAL_HIDL_REPLAY_TEST_TRACE_PATHS = "hal_hidl_replay_test_trace_paths" 135 IKEY_HAL_HIDL_PACKAGE_NAME = "hal_hidl_package_name" 136 137 # Keys for special test cases 138 IKEY_FFMPEG_BINARY_PATH = "ffmpeg_binary_path" 139 IKEY_SYZKALLER_PACKAGES_PATH = "syzkaller_packages_path" 140 IKEY_SYZKALLER_TEMPLATE_PATH = "syzkaller_template_path" 141 142 # Keys for log uploading 143 IKEY_ENABLE_LOG_UPLOADING = "enable_log_uploading" 144 IKEY_LOG_UPLOADING_PATH = "log_uploading_path" 145 IKEY_LOG_UPLOADING_USE_DATE_DIRECTORY = "log_uploading_use_date_directory" 146 IKEY_LOG_UPLOADING_URL_PREFIX = "log_uploading_url_prefix" 147 IKEY_LOG_UPLOADING_GCS_BUCKET_NAME = "log_uploading_gcs_bucket_name" 148 149 # Keys for general user config types 150 IKEY_USER_CONFIG_STR = 'CONFIG_STR' 151 IKEY_USER_CONFIG_INT = 'CONFIG_INT' 152 IKEY_USER_CONFIG_BOOL = 'CONFIG_BOOL' 153 154 # A list of keys whose values in configs should not be passed to test 155 # classes without unpacking first. 156 RESERVED_KEYS = (KEY_TESTBED, KEY_LOG_PATH, KEY_TEST_PATHS) 157 158 # Keys for special run modes 159 IKEY_COLLECT_TESTS_ONLY = "collect_tests_only" 160 RUN_AS_VTS_SELFTEST = "run_as_vts_self_test" 161 162 # Vts compliance test related keys 163 RUN_AS_COMPLIANCE_TEST = "run_as_compliance_test" 164 165 # Mobly test related keys 166 MOBLY_TEST_MODULE = "MOBLY_TEST_MODULE" 167 168 # Controller option keys 169 SHELL_DEFAULT_NOHUP = "shell_default_nohup" 170