• 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_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'
134
135RESOLV_CONF_FILE = '/etc/resolv.conf'
136
137PENDING_SHUTDOWN_PATH = '/var/lib/crash_reporter/pending_clean_shutdown'
138UNCLEAN_SHUTDOWN_DETECTED_PATH = '/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')
151
152SHILL_XMLRPC_SERVER_CLEANUP_PATTERN = 'shill_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_CLEANUP_PATTERN = 'multimedia_xmlrpc_server'
176MULTIMEDIA_XMLRPC_SERVER_READY_METHOD = 'ready'
177MULTIMEDIA_XMLRPC_SERVER_LOG_FILE= '/var/log/multimedia_xmlrpc_server.log'
178MULTIMEDIA_XMLRPC_SERVER_REQUEST_TIMEOUT = 180
179
180AUDIO_TEST_EXTENSION = (
181        '/usr/local/autotest/cros/multimedia/audio_test_extension')
182DISPLAY_TEST_EXTENSION = (
183        '/usr/local/autotest/cros/multimedia/display_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