Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1604)

Unified Diff: Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 22978015: Clean up the way we determine which env vars to pass to content_shell. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/port/driver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/layout_tests/port/base.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py
index 5ab1250bda5abd593d7e4dd6fe3c7cdb3949d97a..ff4f469476a96d11c496e208b23d3fe962a4fb75 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -869,44 +869,46 @@ class Port(object):
def setup_environ_for_server(self, server_name=None):
# We intentionally copy only a subset of os.environ when
# launching subprocesses to ensure consistent test results.
- clean_env = {}
+ clean_env = {
+ 'LOCAL_RESOURCE_ROOT': self.layout_tests_dir(), # FIXME: Is this used?
+ }
variables_to_copy = [
- # For Linux:
- 'XAUTHORITY',
- 'HOME',
- 'LANG',
- 'LD_LIBRARY_PATH',
- 'DBUS_SESSION_BUS_ADDRESS',
- 'XDG_DATA_DIRS',
-
- # Darwin:
- 'DYLD_LIBRARY_PATH',
- 'HOME',
-
- # CYGWIN:
- 'HOMEDRIVE',
- 'HOMEPATH',
- '_NT_SYMBOL_PATH',
-
- # Windows:
- 'PATH',
-
- # Most ports (?):
- 'WEBKIT_TESTFONTS',
- 'WEBKITOUTPUTDIR',
-
- # Chromium:
+ 'WEBKIT_TESTFONTS', # FIXME: Is this still used?
+ 'WEBKITOUTPUTDIR', # FIXME: Is this still used?
Dirk Pranke 2013/08/19 21:58:52 Note that I don't want to actually try and figure
'CHROME_DEVEL_SANDBOX',
'CHROME_IPC_LOGGING',
'ASAN_OPTIONS',
-
]
+ if self.host.platform.is_linux() or self.host.platform.is_freebsd():
+ variables_to_copy += [
+ 'XAUTHORITY',
+ 'HOME',
+ 'LANG',
+ 'LD_LIBRARY_PATH',
+ 'DBUS_SESSION_BUS_ADDRESS',
+ 'XDG_DATA_DIRS',
+ ]
+ clean_env['DISPLAY'] = self._value_or_default_from_environ('DISPLAY', ':1')
+ if self.host.platform.is_mac():
+ clean_env['DYLD_LIBRARY_PATH'] = self._build_path()
+ clean_env['DYLD_FRAMEWORK_PATH'] = self._build_path()
+ variables_to_copy += [
+ 'HOME',
+ ]
+ if self.host.platform.is_win():
+ variables_to_copy += [
+ 'PATH',
+ ]
+ if self.host.platform.is_cygwin():
+ variables_to_copy += [
+ 'HOMEDRIVE',
+ 'HOMEPATH',
+ '_NT_SYMBOL_PATH',
+ ]
+
for variable in variables_to_copy:
self._copy_value_from_environ_if_set(clean_env, variable)
- # For Linux:
- clean_env['DISPLAY'] = self._value_or_default_from_environ('DISPLAY', ':1')
-
for string_variable in self.get_option('additional_env_var', []):
[name, value] = string_variable.split('=', 1)
clean_env[name] = value
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/port/driver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698