1# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# The names of expected mount-points, devices, magic files, etc on chrome os. 6 7# Constants used by other constants. 8USER_DATA_DIR = '/home/chronos' 9WHITELIST_DIR = '/var/lib/whitelist' 10LOG_DIR = '/var/log' 11 12# Rest of constants. 13BROWSER = 'chrome' 14BROWSER_EXE = '/opt/google/chrome/' + BROWSER 15 16CHAPS_USER_DATABASE_PATH = '/home/chronos/user/.chaps/database' 17 18CHROME_CORE_MAGIC_FILE = '/mnt/stateful_partition/etc/collect_chrome_crashes' 19CHROME_LOG_DIR = '/var/log/chrome' 20CHROME_VERSION_COMMAND = BROWSER_EXE + ' --version' 21 22# Directory to save log files preserved during autoupdate. 23AUTOUPDATE_PRESERVE_LOG = '/mnt/stateful_partition/unencrypted/preserve/log' 24 25CLEANUP_LOGS_PAUSED_FILE = '/var/lib/cleanup_logs_paused' 26 27CLIENT_LOGIN_URL = '/accounts/ClientLogin' 28CLIENT_LOGIN_NEW_URL = '/ClientLogin' 29 30CRASH_DIR = '/var/spool/crash' 31CRASH_REPORTER_RESIDUE_DIR = '/tmp/crash_reporter' 32 33# LOGS to collect from DUTs 34LOG_CONSOLE_RAMOOPS = '/dev/pstore/console-ramoops' 35LOG_I915_ERROR_STATE = '/sys/kernel/debug/dri/0/i915_error_state' 36PRIOR_LOGS_DIR = '/mnt/stateful_partition/unencrypted/prior_logs' 37 38CREDENTIALS = { 39 '$mockowner': ['mockowner.test.account@gmail.com', 'perfsmurf'], 40 '$default': ['performance.test.account@gmail.com', 'perfsmurf'], 41 '$apps': ['performance.test.account@googleapps.com', 'perfsmurf'], 42 '$backdoor': ['chronos@gmail.com', 'chronos'], 43} 44 45SHADOW_ROOT = '/home/.shadow' 46 47CRYPTOHOME_DEV_REGEX_ANY = r'.*' 48CRYPTOHOME_DEV_REGEX_REGULAR_USER_SHADOW = r'^/home/\.shadow/.*/vault$' 49CRYPTOHOME_DEV_REGEX_REGULAR_USER_EPHEMERAL = r'^ephemeralfs/.*$' 50CRYPTOHOME_DEV_REGEX_REGULAR_USER = r'(%s|%s)' % ( 51 CRYPTOHOME_DEV_REGEX_REGULAR_USER_SHADOW, 52 CRYPTOHOME_DEV_REGEX_REGULAR_USER_EPHEMERAL) 53CRYPTOHOME_DEV_REGEX_GUEST = r'^guestfs$' 54 55CRYPTOHOME_FS_REGEX_ANY = r'.*' 56CRYPTOHOME_FS_REGEX_TMPFS = r'^tmpfs$' 57 58CRYPTOHOME_MOUNT_PT = USER_DATA_DIR + '/user' 59 60CRYPTOHOMED_LOG = '/var/log/cryptohomed.log' 61 62# Directories to copy out of cryptohome, relative to CRYPTOHOME_MOUNT_PT. 63CRYPTOHOME_DIRS_TO_RECOVER = ['crash', 'log'] 64 65DISABLE_BROWSER_RESTART_MAGIC_FILE = '/var/run/disable_chrome_restart' 66DEFAULT_OWNERSHIP_TIMEOUT = 300 # Ownership is an inherently random process. 67 68ENABLE_BROWSER_HANG_DETECTION_FILE = \ 69 '/var/run/session_manager/enable_hang_detection' 70 71FLIMFLAM_TEST_PATH = '/usr/lib/flimflam/test/' 72 73GUEST_USER = '$guest' 74 75LOGIN_PROFILE = USER_DATA_DIR + '/Default' 76 77LOGIN_PROMPT_STATUS_COMMAND = 'bootstat_get_last login-prompt-visible' 78 79LSB_RELEASE = '/etc/lsb-release' 80 81MOCK_OWNER_CERT = 'mock_owner_cert.pem' 82MOCK_OWNER_KEY = 'mock_owner_private.key' 83MOCK_OWNER_POLICY = 'mock_owner.policy' 84 85NETWORK_MANAGER = 'flimflam' 86 87ISSUE_AUTH_TOKEN_URL = '/accounts/IssueAuthToken' 88ISSUE_AUTH_TOKEN_NEW_URL = '/IssueAuthToken' 89 90OAUTH1_GET_REQUEST_TOKEN_URL = '/accounts/o8/GetOAuthToken' 91OAUTH1_GET_REQUEST_TOKEN_NEW_URL = '/o/oauth/GetOAuthToken/' 92OAUTH1_GET_ACCESS_TOKEN_URL = '/accounts/OAuthGetAccessToken' 93OAUTH1_GET_ACCESS_TOKEN_NEW_URL = '/OAuthGetAccessToken' 94OAUTH_LOGIN_URL = '/accounts/OAuthLogin' 95OAUTH_LOGIN_NEW_URL = '/OAuthLogin' 96MERGE_SESSION_URL = '/MergeSession' 97 98OAUTH2_CLIENT_ID = '77185425430.apps.googleusercontent.com' 99OAUTH2_CLIENT_SECRET = 'OTJgUOQcT7lO7GsGZq2G4IlT' 100OAUTH2_WRAP_BRIDGE_URL = '/accounts/OAuthWrapBridge' 101OAUTH2_WRAP_BRIDGE_NEW_URL = '/OAuthWrapBridge' 102OAUTH2_GET_AUTH_CODE_URL = '/o/oauth2/programmatic_auth' 103OAUTH2_GET_TOKEN_URL = '/o/oauth2/token' 104 105OWNER_KEY_FILE = WHITELIST_DIR + '/owner.key' 106 107PORTAL_CHECK_URL = '/generate_204' 108 109SERVICE_LOGIN_URL = '/accounts/ServiceLogin' 110SERVICE_LOGIN_NEW_URL = '/ServiceLogin' 111SERVICE_LOGIN_AUTH_URL = '/ServiceLoginAuth' 112SERVICE_LOGIN_AUTH_ERROR = 'The username or password you entered is incorrect.' 113 114SESSION_MANAGER = 'session_manager' 115SIGNED_POLICY_FILE = WHITELIST_DIR + '/policy' 116SPECIAL_CASE_DOMAIN = 'gmail.com' 117USER_POLICY_DIR = '/var/run/user_policy' 118USER_POLICY_KEY_FILENAME = 'policy.pub' 119 120TOKEN_AUTH_URL = '/accounts/TokenAuth' 121TOKEN_AUTH_NEW_URL = '/TokenAuth' 122 123UI_LOG = '/var/log/ui/ui.LATEST' 124UI_RESPAWN_TIMESTAMPS_FILE = '/tmp/ui-respawn-timestamps' 125UI_TOO_CRASHY_TIMESTAMPS_FILE = '/tmp/ui-too-crashy-timestamps' 126UPDATE_ENGINE_LOG = '/var/log/update_engine.log' 127 128RESOLV_CONF_FILE = '/etc/resolv.conf' 129 130PENDING_SHUTDOWN_PATH = '/var/lib/crash_reporter/pending_clean_shutdown' 131UNCLEAN_SHUTDOWN_DETECTED_PATH = '/var/run/unclean-shutdown-detected' 132 133INTERACTIVE_XMLRPC_SERVER_PORT = 9980 134INTERACTIVE_XMLRPC_SERVER_COMMAND = ( 135 'cd /usr/local/autotest/common_lib/cros; ' 136 './interactive_xmlrpc_server.py') 137INTERACTIVE_XMLRPC_SERVER_CLEANUP_PATTERN = 'interactive_xmlrpc_server' 138INTERACTIVE_XMLRPC_SERVER_READY_METHOD = 'ready' 139 140SHILL_XMLRPC_SERVER_PORT = 9989 141SHILL_XMLRPC_SERVER_COMMAND = ( 142 'cd /usr/local/autotest/cros/networking; ' 143 './shill_xmlrpc_server.py') 144SHILL_BRILLO_XMLRPC_SERVER_COMMAND = ( 145 '/system/bin/shill-test-rpc-proxy --port=%s' % SHILL_XMLRPC_SERVER_PORT) 146ANDROID_XMLRPC_SERVER_TARGET_DIR = '/root' 147ANDROID_XMLRPC_SERVER_COMMAND = ( 148 'cd %s; ' 149 './android_xmlrpc_server.py' % ANDROID_XMLRPC_SERVER_TARGET_DIR) 150SHILL_XMLRPC_SERVER_CLEANUP_PATTERN = 'shill_xmlrpc_server' 151SHILL_BRILLO_XMLRPC_SERVER_CLEANUP_PATTERN = 'shill-test-rpc-proxy' 152ANDROID_XMLRPC_SERVER_CLEANUP_PATTERN = 'android_xmlrpc_server' 153SHILL_XMLRPC_SERVER_READY_METHOD = 'ready' 154 155BLUETOOTH_DEVICE_XMLRPC_SERVER_PORT = 9990 156BLUETOOTH_DEVICE_XMLRPC_SERVER_COMMAND = ( 157 'cd /usr/local/autotest/cros/bluetooth; ' 158 './bluetooth_device_xmlrpc_server.py') 159BLUETOOTH_DEVICE_XMLRPC_SERVER_CLEANUP_PATTERN = ( 160 'bluetooth_device_xmlrpc_server') 161BLUETOOTH_DEVICE_XMLRPC_SERVER_READY_METHOD = 'ready' 162 163BLUETOOTH_TESTER_XMLRPC_SERVER_PORT = 9990 164BLUETOOTH_TESTER_XMLRPC_SERVER_COMMAND = ( 165 'cd /usr/local/autotest/cros/bluetooth; ' 166 './bluetooth_tester_xmlrpc_server.py') 167BLUETOOTH_TESTER_XMLRPC_SERVER_CLEANUP_PATTERN = ( 168 'bluetooth_tester_xmlrpc_server') 169BLUETOOTH_TESTER_XMLRPC_SERVER_READY_METHOD = 'ready' 170 171MULTIMEDIA_XMLRPC_SERVER_PORT = 9991 172MULTIMEDIA_XMLRPC_SERVER_COMMAND = ( 173 'cd /usr/local/autotest/cros/multimedia; ' 174 './multimedia_xmlrpc_server.py') 175MULTIMEDIA_XMLRPC_SERVER_RESTART_COMMAND = ( 176 'cd /usr/local/autotest/cros/multimedia; ' 177 './multimedia_xmlrpc_server.py --restart') 178MULTIMEDIA_XMLRPC_SERVER_CLEANUP_PATTERN = 'multimedia_xmlrpc_server' 179MULTIMEDIA_XMLRPC_SERVER_READY_METHOD = 'ready' 180MULTIMEDIA_XMLRPC_SERVER_LOG_FILE= '/var/log/multimedia_xmlrpc_server.log' 181 182MULTIMEDIA_TEST_EXTENSION = ( 183 '/usr/local/autotest/cros/multimedia/multimedia_test_extension') 184 185APMANAGER_XMLRPC_SERVER_PORT = 9992 186APMANAGER_XMLRPC_SERVER_COMMAND = ( 187 'cd /usr/local/autotest/cros/networking; ' 188 './apmanager_xmlrpc_server.py') 189APMANAGER_XMLRPC_SERVER_CLEANUP_PATTERN = 'apmanager_xmlrpc_server' 190APMANAGER_XMLRPC_SERVER_READY_METHOD = 'ready' 191 192DARK_RESUME_XMLRPC_SERVER_PORT = 9993 193DARK_RESUME_XMLRPC_SERVER_COMMAND = ( 194 'cd /usr/local/autotest/cros; ' 195 './dark_resume_xmlrpc_server.py') 196DARK_RESUME_XMLRPC_SERVER_CLEANUP_PATTERN = 'dark_resume_xmlrpc_server' 197DARK_RESUME_XMLRPC_SERVER_READY_METHOD = 'ready' 198 199# Bug filing 200CHROME_VERSION = 'CHROME_VERSION' 201 202# Moblab Environment Constants. 203MOBLAB_USER = 'moblab' 204 205# Variant test keyval 206VARIANT_KEY = 'variant_key' 207