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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/win.py

Issue 327423008: Change port to use apache by default on win7, update test expectations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge forward to r177025 Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 def additional_drt_flag(self): 84 def additional_drt_flag(self):
85 flags = super(WinPort, self).additional_drt_flag() 85 flags = super(WinPort, self).additional_drt_flag()
86 flags += ['--enable-direct-write'] 86 flags += ['--enable-direct-write']
87 if not self.get_option('disable_breakpad'): 87 if not self.get_option('disable_breakpad'):
88 flags += ['--enable-crash-reporter', '--crash-dumps-dir=%s' % self._ dump_reader.crash_dumps_directory()] 88 flags += ['--enable-crash-reporter', '--crash-dumps-dir=%s' % self._ dump_reader.crash_dumps_directory()]
89 return flags 89 return flags
90 90
91 def check_httpd(self): 91 def check_httpd(self):
92 res = super(WinPort, self).check_httpd() 92 res = super(WinPort, self).check_httpd()
93 if self.get_option('use_apache'): 93 if self.uses_apache():
94 # In order to run CGI scripts on Win32 that use unix shebang lines, we need to 94 # In order to run CGI scripts on Win32 that use unix shebang lines, we need to
95 # create entries in the registry that remap the extensions (.pl and .cgi) to the 95 # create entries in the registry that remap the extensions (.pl and .cgi) to the
96 # appropriate Win32 paths. The command line arguments must match the command 96 # appropriate Win32 paths. The command line arguments must match the command
97 # line arguments in the shebang line exactly. 97 # line arguments in the shebang line exactly.
98 if _winreg: 98 if _winreg:
99 res = self._check_reg(r'.cgi\Shell\ExecCGI\Command') and res 99 res = self._check_reg(r'.cgi\Shell\ExecCGI\Command') and res
100 res = self._check_reg(r'.pl\Shell\ExecCGI\Command') and res 100 res = self._check_reg(r'.pl\Shell\ExecCGI\Command') and res
101 else: 101 else:
102 _log.warning("Could not check the registry; http may not work co rrectly.") 102 _log.warning("Could not check the registry; http may not work co rrectly.")
103 103
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 # FIXME: lighttpd depends on some environment variable we're not whiteli sting. 157 # FIXME: lighttpd depends on some environment variable we're not whiteli sting.
158 # We should add the variable to an explicit whitelist in base.Port. 158 # We should add the variable to an explicit whitelist in base.Port.
159 # FIXME: This is a temporary hack to get the cr-win bot online until 159 # FIXME: This is a temporary hack to get the cr-win bot online until
160 # someone from the cr-win port can take a look. 160 # someone from the cr-win port can take a look.
161 use_apache = self.get_option('use_apache') 161 use_apache = self.get_option('use_apache')
162 apache_envvars = ['SYSTEMDRIVE', 'SYSTEMROOT', 'TEMP', 'TMP'] 162 apache_envvars = ['SYSTEMDRIVE', 'SYSTEMROOT', 'TEMP', 'TMP']
163 for key, value in os.environ.items(): 163 for key, value in os.environ.items():
164 if key not in env and (not use_apache or key in apache_envvars): 164 if key not in env and (not use_apache or key in apache_envvars):
165 env[key] = value 165 env[key] = value
166 166
167 if use_apache:
168 return env
169
170 # Put the cygwin directory first in the path to find cygwin1.dll. 167 # Put the cygwin directory first in the path to find cygwin1.dll.
171 env["PATH"] = "%s;%s" % (self.path_from_chromium_base("third_party", "cy gwin", "bin"), env["PATH"]) 168 env["PATH"] = "%s;%s" % (self.path_from_chromium_base("third_party", "cy gwin", "bin"), env["PATH"])
172 # Configure the cygwin directory so that pywebsocket finds proper 169 # Configure the cygwin directory so that pywebsocket finds proper
173 # python executable to run cgi program. 170 # python executable to run cgi program.
174 env["CYGWIN_PATH"] = self.path_from_chromium_base("third_party", "cygwin ", "bin") 171 env["CYGWIN_PATH"] = self.path_from_chromium_base("third_party", "cygwin ", "bin")
175 if self.get_option('register_cygwin'): 172 if self.get_option('register_cygwin'):
176 setup_mount = self.path_from_chromium_base("third_party", "cygwin", "setup_mount.bat") 173 setup_mount = self.path_from_chromium_base("third_party", "cygwin", "setup_mount.bat")
177 self._executive.run_command([setup_mount]) # Paths are all absolute , so this does not require a cwd. 174 self._executive.run_command([setup_mount]) # Paths are all absolute , so this does not require a cwd.
178 return env 175 return env
179 176
(...skipping 16 matching lines...) Expand all
196 return result 193 return result
197 194
198 def operating_system(self): 195 def operating_system(self):
199 return 'win' 196 return 'win'
200 197
201 def relative_test_filename(self, filename): 198 def relative_test_filename(self, filename):
202 path = filename[len(self.layout_tests_dir()) + 1:] 199 path = filename[len(self.layout_tests_dir()) + 1:]
203 return path.replace('\\', '/') 200 return path.replace('\\', '/')
204 201
205 def uses_apache(self): 202 def uses_apache(self):
206 return self.get_option('use_apache') 203 val = self.get_option('use_apache')
204 if val is None:
205 val = bool(self.version() != 'xp')
206 return val
207 207
208 def path_to_apache(self): 208 def path_to_apache(self):
209 return self.path_from_chromium_base('third_party', 'apache-win32', 'bin' , 'httpd.exe') 209 return self.path_from_chromium_base('third_party', 'apache-win32', 'bin' , 'httpd.exe')
210 210
211 def path_to_apache_config_file(self): 211 def path_to_apache_config_file(self):
212 return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 'w in-httpd.conf') 212 return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 'w in-httpd.conf')
213 213
214 def _lighttpd_path(self, *comps): 214 def _lighttpd_path(self, *comps):
215 return self.path_from_chromium_base('third_party', 'lighttpd', 'win', *c omps) 215 return self.path_from_chromium_base('third_party', 'lighttpd', 'win', *c omps)
216 216
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 return result 252 return result
253 253
254 def look_for_new_crash_logs(self, crashed_processes, start_time): 254 def look_for_new_crash_logs(self, crashed_processes, start_time):
255 if self.get_option('disable_breakpad'): 255 if self.get_option('disable_breakpad'):
256 return None 256 return None
257 return self._dump_reader.look_for_new_crash_logs(crashed_processes, star t_time) 257 return self._dump_reader.look_for_new_crash_logs(crashed_processes, star t_time)
258 258
259 def clobber_old_port_specific_results(self): 259 def clobber_old_port_specific_results(self):
260 if not self.get_option('disable_breakpad'): 260 if not self.get_option('disable_breakpad'):
261 self._dump_reader.clobber_old_results() 261 self._dump_reader.clobber_old_results()
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698