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

Side by Side Diff: webkit/tools/layout_tests/layout_package/http_server.py

Issue 146112: Allow layout tests to be located both in src/webkit/data/layout_tests and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
OLDNEW
1 #!/bin/env python 1 #!/bin/env python
2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A class to help start/stop the lighttpd server used by layout tests.""" 6 """A class to help start/stop the lighttpd server used by layout tests."""
7 7
8 8
9 import logging 9 import logging
10 import optparse 10 import optparse
(...skipping 16 matching lines...) Expand all
27 27
28 class HttpdNotStarted(Exception): 28 class HttpdNotStarted(Exception):
29 pass 29 pass
30 30
31 class Lighttpd: 31 class Lighttpd:
32 # Webkit tests 32 # Webkit tests
33 try: 33 try:
34 _webkit_tests = PathFromBase('webkit', 'data', 'layout_tests', 34 _webkit_tests = PathFromBase('webkit', 'data', 'layout_tests',
35 'LayoutTests', 'http', 'tests') 35 'LayoutTests', 'http', 'tests')
36 except google.path_utils.PathNotFound: 36 except google.path_utils.PathNotFound:
37 _webkit_tests = None 37 # If webkit/data/layout_tests/LayoutTests/http/tests does not exist, assume
38 # wekit tests are located in third_party/WebKit/LayoutTests/http/tests.
39 try:
40 _webkit_tests = PathFromBase('third_party', 'WebKit',
41 'LayoutTests', 'http', 'tests')
42 except google.path_utils.PathNotFound:
43 _webkit_tests = None
38 44
39 # New tests for Chrome 45 # New tests for Chrome
40 try: 46 try:
41 _pending_tests = PathFromBase('webkit', 'data', 'layout_tests', 47 _pending_tests = PathFromBase('webkit', 'data', 'layout_tests',
42 'pending', 'http', 'tests') 48 'pending', 'http', 'tests')
43 except google.path_utils.PathNotFound: 49 except google.path_utils.PathNotFound:
44 _pending_tests = None 50 _pending_tests = None
45 51
46 # Path where we can access all of the tests 52 # Path where we can access all of the tests
47 _all_tests = PathFromBase('webkit', 'data', 'layout_tests') 53 _all_tests = PathFromBase('webkit', 'data', 'layout_tests')
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 # Specifying port but no root does not seem meaningful. 263 # Specifying port but no root does not seem meaningful.
258 raise 'Specifying port requires also a root.' 264 raise 'Specifying port requires also a root.'
259 httpd = Lighttpd(tempfile.gettempdir(), 265 httpd = Lighttpd(tempfile.gettempdir(),
260 port=options.port, 266 port=options.port,
261 root=options.root, 267 root=options.root,
262 register_cygwin=options.register_cygwin) 268 register_cygwin=options.register_cygwin)
263 if 'start' == options.server: 269 if 'start' == options.server:
264 httpd.Start() 270 httpd.Start()
265 else: 271 else:
266 httpd.Stop(force=True) 272 httpd.Stop(force=True)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698