1# Copyright 2017, 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""" 16Various globals used by atest. 17""" 18 19MODE = 'DEFAULT' 20 21# Result server constants for atest_utils. 22RESULT_SERVER = '' 23RESULT_SERVER_ARGS = [] 24RESULT_SERVER_TIMEOUT = 5 25 26# Arg constants. 27WAIT_FOR_DEBUGGER = 'WAIT_FOR_DEBUGGER' 28DISABLE_INSTALL = 'DISABLE_INSTALL' 29DISABLE_TEARDOWN = 'DISABLE_TEARDOWN' 30PRE_PATCH_ITERATIONS = 'PRE_PATCH_ITERATIONS' 31POST_PATCH_ITERATIONS = 'POST_PATCH_ITERATIONS' 32PRE_PATCH_FOLDER = 'PRE_PATCH_FOLDER' 33POST_PATCH_FOLDER = 'POST_PATCH_FOLDER' 34SERIAL = 'SERIAL' 35CUSTOM_ARGS = 'CUSTOM_ARGS' 36 37# Application exit codes. 38EXIT_CODE_SUCCESS = 0 39EXIT_CODE_ENV_NOT_SETUP = 1 40EXIT_CODE_BUILD_FAILURE = 2 41EXIT_CODE_ERROR = 3 42EXIT_CODE_TEST_NOT_FOUND = 4 43 44# Test finder constants. 45MODULE_CONFIG = 'AndroidTest.xml' 46MODULE_NAME = 'module_name' 47MODULE_PATH = 'path' 48MODULE_CLASS = 'class' 49MODULE_INSTALLED = 'installed' 50MODULE_CLASS_ROBOLECTRIC = 'ROBOLECTRIC' 51MODULE_FOR_2ND_ARCH = 'for_2nd_arch' 52 53# Env constants 54ANDROID_BUILD_TOP = 'ANDROID_BUILD_TOP' 55ANDROID_OUT = 'OUT' 56ANDROID_OUT_DIR = 'OUT_DIR' 57ANDROID_HOST_OUT = 'ANDROID_HOST_OUT' 58 59# Test Info data keys 60# Value of include-filter option. 61TI_FILTER = 'filter' 62TI_REL_CONFIG = 'rel_config' 63# Value of module-arg option 64TI_MODULE_ARG = 'module-arg' 65 66# Google TF 67GTF_MODULE = 'google-tradefed' 68GTF_TARGET = 'google-tradefed-core' 69 70# Test group for tests in TEST_MAPPING 71TEST_GROUP_PRESUBMIT = 'presubmit' 72TEST_GROUP_POSTSUBMIT = 'postsubmit' 73 74# TradeFed command line args 75TF_INCLUDE_FILTER = '--include-filter' 76TF_ATEST_INCLUDE_FILTER = '--atest-include-filter' 77TF_ATEST_INCLUDE_FILTER_VALUE_FMT = '{test_name}:{test_filter}' 78TF_MODULE_ARG = '--module-arg' 79TF_MODULE_ARG_VALUE_FMT = '{test_name}:{option_name}:{option_value}' 80