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