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_PSTORE_DIRS = ('/sys/fs/pstore',) 35LOG_I915_ERROR_STATE = '/sys/kernel/debug/dri/0/i915_error_state' 36 37CREDENTIALS = { 38 '$mockowner': ['mockowner.test.account@gmail.com', 'perfsmurf'], 39 '$default': ['performance.test.account@gmail.com', 'perfsmurf'], 40 '$apps': ['performance.test.account@googleapps.com', 'perfsmurf'], 41 '$backdoor': ['chronos@gmail.com', 'chronos'], 42} 43 44SHADOW_ROOT = '/home/.shadow' 45 46CRYPTOHOME_DEV_REGEX_ANY = r'.*' 47CRYPTOHOME_DEV_REGEX_REGULAR_USER_SHADOW = r'^/home/\.shadow/.*/vault$' 48CRYPTOHOME_DEV_REGEX_REGULAR_USER_DEVICE = r'^/dev/(?!loop[0-9]+$)[^/]*$' 49CRYPTOHOME_DEV_REGEX_REGULAR_USER_EPHEMERAL = r'^ephemeralfs/.*$' 50# Ecryptfs-based user home directory mounts the SHADOW encrypted directory, 51# while ext4-crypto based user home is a bind-mount to an encrypted directory 52# part of a ext4 filesystem that mounts the main disk device. Both can be 53# a home directory of a regular user. 54CRYPTOHOME_DEV_REGEX_REGULAR_USER = r'(%s|%s|%s)' % ( 55 CRYPTOHOME_DEV_REGEX_REGULAR_USER_SHADOW, 56 CRYPTOHOME_DEV_REGEX_REGULAR_USER_DEVICE, 57 CRYPTOHOME_DEV_REGEX_REGULAR_USER_EPHEMERAL) 58CRYPTOHOME_DEV_REGEX_LOOP_DEVICE = r'^/dev/loop[0-9]+$' 59CRYPTOHOME_DEV_REGEX_GUEST = r'^guestfs$' 60 61CRYPTOHOME_FS_REGEX_ANY = r'.*' 62CRYPTOHOME_FS_REGEX_TMPFS = r'^tmpfs$' 63CRYPTOHOME_FS_REGEX_EXT4 = r'^ext4$' 64CRYPTOHOME_FS_REGEX_ECRYPTFS = r'^ecryptfs$' 65 66CRYPTOHOME_MOUNT_PT = USER_DATA_DIR + '/user' 67 68CRYPTOHOMED_LOG = '/var/log/cryptohomed.log' 69 70# Directories to copy out of cryptohome, relative to CRYPTOHOME_MOUNT_PT. 71CRYPTOHOME_DIRS_TO_RECOVER = ['crash', 'log'] 72 73DISABLE_BROWSER_RESTART_MAGIC_FILE = '/run/disable_chrome_restart' 74DEFAULT_OWNERSHIP_TIMEOUT = 300 # Ownership is an inherently random process. 75 76ENABLE_BROWSER_HANG_DETECTION_FILE = \ 77 '/run/session_manager/enable_hang_detection' 78 79FLIMFLAM_TEST_PATH = '/usr/lib/flimflam/test/' 80 81GUEST_USER = '$guest' 82 83LOGIN_PROFILE = USER_DATA_DIR + '/Default' 84 85LOGIN_PROMPT_STATUS_COMMAND = 'bootstat_get_last login-prompt-visible' 86 87LSB_RELEASE = '/etc/lsb-release' 88 89MOCK_OWNER_CERT = 'mock_owner_cert.pem' 90MOCK_OWNER_KEY = 'mock_owner_private.key' 91MOCK_OWNER_POLICY = 'mock_owner.policy' 92 93NETWORK_MANAGER = 'flimflam' 94 95ISSUE_AUTH_TOKEN_URL = '/accounts/IssueAuthToken' 96ISSUE_AUTH_TOKEN_NEW_URL = '/IssueAuthToken' 97 98OAUTH1_GET_REQUEST_TOKEN_URL = '/accounts/o8/GetOAuthToken' 99OAUTH1_GET_REQUEST_TOKEN_NEW_URL = '/o/oauth/GetOAuthToken/' 100OAUTH1_GET_ACCESS_TOKEN_URL = '/accounts/OAuthGetAccessToken' 101OAUTH1_GET_ACCESS_TOKEN_NEW_URL = '/OAuthGetAccessToken' 102OAUTH_LOGIN_URL = '/accounts/OAuthLogin' 103OAUTH_LOGIN_NEW_URL = '/OAuthLogin' 104MERGE_SESSION_URL = '/MergeSession' 105 106OAUTH2_CLIENT_ID = '77185425430.apps.googleusercontent.com' 107OAUTH2_CLIENT_SECRET = 'OTJgUOQcT7lO7GsGZq2G4IlT' 108OAUTH2_WRAP_BRIDGE_URL = '/accounts/OAuthWrapBridge' 109OAUTH2_WRAP_BRIDGE_NEW_URL = '/OAuthWrapBridge' 110OAUTH2_GET_AUTH_CODE_URL = '/o/oauth2/programmatic_auth' 111OAUTH2_GET_TOKEN_URL = '/o/oauth2/token' 112 113OWNER_KEY_FILE = WHITELIST_DIR + '/owner.key' 114 115PORTAL_CHECK_URL = '/generate_204' 116 117SERVICE_LOGIN_URL = '/accounts/ServiceLogin' 118SERVICE_LOGIN_NEW_URL = '/ServiceLogin' 119SERVICE_LOGIN_AUTH_URL = '/ServiceLoginAuth' 120SERVICE_LOGIN_AUTH_ERROR = 'The username or password you entered is incorrect.' 121 122SESSION_MANAGER = 'session_manager' 123SIGNED_POLICY_FILE = WHITELIST_DIR + '/policy' 124SPECIAL_CASE_DOMAIN = 'gmail.com' 125USER_POLICY_DIR = '/run/user_policy' 126USER_POLICY_KEY_FILENAME = 'policy.pub' 127 128TOKEN_AUTH_URL = '/accounts/TokenAuth' 129TOKEN_AUTH_NEW_URL = '/TokenAuth' 130 131UI_LOG = '/var/log/ui/ui.LATEST' 132UI_RESPAWN_TIMESTAMPS_FILE = '/tmp/ui-respawn-timestamps' 133UI_TOO_CRASHY_TIMESTAMPS_FILE = '/tmp/ui-too-crashy-timestamps' 134UPDATE_ENGINE_LOG = '/var/log/update_engine.log' 135 136RESOLV_CONF_FILE = '/etc/resolv.conf' 137 138PENDING_SHUTDOWN_PATH = '/var/lib/crash_reporter/pending_clean_shutdown' 139UNCLEAN_SHUTDOWN_DETECTED_PATH = '/run/unclean-shutdown-detected' 140 141INTERACTIVE_XMLRPC_SERVER_PORT = 9980 142INTERACTIVE_XMLRPC_SERVER_COMMAND = ( 143 'cd /usr/local/autotest/common_lib/cros; ' 144 './interactive_xmlrpc_server.py') 145INTERACTIVE_XMLRPC_SERVER_CLEANUP_PATTERN = 'interactive_xmlrpc_server' 146INTERACTIVE_XMLRPC_SERVER_READY_METHOD = 'ready' 147 148SHILL_XMLRPC_SERVER_PORT = 9989 149SHILL_XMLRPC_SERVER_COMMAND = ( 150 'cd /usr/local/autotest/cros/networking; ' 151 './shill_xmlrpc_server.py') 152SHILL_BRILLO_XMLRPC_SERVER_COMMAND = ( 153 '/system/bin/shill-test-rpc-proxy --port=%s' % SHILL_XMLRPC_SERVER_PORT) 154# /usr/local/bin is write-accessible on both ChromeOS and test-station platforms 155ANDROID_XMLRPC_SERVER_FMT ='android_xmlrpc_server-%s.py' 156ANDROID_XMLRPC_SERVER_TARGET_DIR = '/usr/local/bin' 157ANDROID_XMLRPC_SERVER_COMMAND_FMT = 'cd %s; ./' + ANDROID_XMLRPC_SERVER_FMT 158ANDROID_XMLRPC_SERVER_CLEANUP_PATTERN = 'android_xmlrpc_server-%s' 159 160SHILL_XMLRPC_SERVER_CLEANUP_PATTERN = 'shill_xmlrpc_server' 161SHILL_BRILLO_XMLRPC_SERVER_CLEANUP_PATTERN = 'shill-test-rpc-proxy' 162SHILL_XMLRPC_SERVER_READY_METHOD = 'ready' 163 164BLUETOOTH_DEVICE_XMLRPC_SERVER_PORT = 9990 165BLUETOOTH_DEVICE_XMLRPC_SERVER_COMMAND = ( 166 'cd /usr/local/autotest/cros/bluetooth; ' 167 './bluetooth_device_xmlrpc_server.py') 168BLUETOOTH_DEVICE_XMLRPC_SERVER_CLEANUP_PATTERN = ( 169 'bluetooth_device_xmlrpc_server') 170BLUETOOTH_DEVICE_XMLRPC_SERVER_READY_METHOD = 'ready' 171 172BLUETOOTH_TESTER_XMLRPC_SERVER_PORT = 9990 173BLUETOOTH_TESTER_XMLRPC_SERVER_COMMAND = ( 174 'cd /usr/local/autotest/cros/bluetooth; ' 175 './bluetooth_tester_xmlrpc_server.py') 176BLUETOOTH_TESTER_XMLRPC_SERVER_CLEANUP_PATTERN = ( 177 'bluetooth_tester_xmlrpc_server') 178BLUETOOTH_TESTER_XMLRPC_SERVER_READY_METHOD = 'ready' 179 180MULTIMEDIA_XMLRPC_SERVER_PORT = 9991 181MULTIMEDIA_XMLRPC_SERVER_COMMAND = ( 182 'cd /usr/local/autotest/cros/multimedia; ' 183 './multimedia_xmlrpc_server.py') 184MULTIMEDIA_XMLRPC_SERVER_CLEANUP_PATTERN = 'multimedia_xmlrpc_server' 185MULTIMEDIA_XMLRPC_SERVER_READY_METHOD = 'ready' 186MULTIMEDIA_XMLRPC_SERVER_LOG_FILE= '/var/log/multimedia_xmlrpc_server.log' 187MULTIMEDIA_XMLRPC_SERVER_REQUEST_TIMEOUT = 180 188 189AUDIO_TEST_EXTENSION = ( 190 '/usr/local/autotest/cros/multimedia/audio_test_extension') 191DISPLAY_TEST_EXTENSION = ( 192 '/usr/local/autotest/cros/multimedia/display_test_extension') 193 194APMANAGER_XMLRPC_SERVER_PORT = 9992 195APMANAGER_XMLRPC_SERVER_COMMAND = ( 196 'cd /usr/local/autotest/cros/networking; ' 197 './apmanager_xmlrpc_server.py') 198APMANAGER_XMLRPC_SERVER_CLEANUP_PATTERN = 'apmanager_xmlrpc_server' 199APMANAGER_XMLRPC_SERVER_READY_METHOD = 'ready' 200 201DARK_RESUME_XMLRPC_SERVER_PORT = 9993 202DARK_RESUME_XMLRPC_SERVER_COMMAND = ( 203 'cd /usr/local/autotest/cros; ' 204 './dark_resume_xmlrpc_server.py') 205DARK_RESUME_XMLRPC_SERVER_CLEANUP_PATTERN = 'dark_resume_xmlrpc_server' 206DARK_RESUME_XMLRPC_SERVER_READY_METHOD = 'ready' 207 208# Bug filing 209CHROME_VERSION = 'CHROME_VERSION' 210 211# Moblab Environment Constants. 212MOBLAB_USER = 'moblab' 213 214# Variant test keyval 215VARIANT_KEY = 'variant_key' 216