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