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

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

Issue 271016: Fix ui tests WorkerHttpLayoutTests failure (Closed)
Patch Set: Created 11 years, 2 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 | « no previous file | 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 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
11 import os 11 import os
12 import shutil 12 import shutil
13 import subprocess 13 import subprocess
14 import sys 14 import sys
15 import tempfile 15 import tempfile
16 import time 16 import time
17 import urllib 17 import urllib
18 18
19 import path_utils 19 import path_utils
20
21 # So we can import httpd_utils below to make ui_tests happy.
22 sys.path.append(path_utils.PathFromBase('tools', 'python'))
20 import google.httpd_utils 23 import google.httpd_utils
21 24
22 def RemoveLogFiles(folder, starts_with): 25 def RemoveLogFiles(folder, starts_with):
23 files = os.listdir(folder) 26 files = os.listdir(folder)
24 for file in files: 27 for file in files:
25 if file.startswith(starts_with) : 28 if file.startswith(starts_with) :
26 full_path = os.path.join(folder, file) 29 full_path = os.path.join(folder, file)
27 os.remove(full_path) 30 os.remove(full_path)
28 31
29 class Lighttpd: 32 class Lighttpd:
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 raise 'Specifying port requires also a root.' 273 raise 'Specifying port requires also a root.'
271 httpd = Lighttpd(tempfile.gettempdir(), 274 httpd = Lighttpd(tempfile.gettempdir(),
272 port=options.port, 275 port=options.port,
273 root=options.root, 276 root=options.root,
274 register_cygwin=options.register_cygwin, 277 register_cygwin=options.register_cygwin,
275 run_background=options.run_background) 278 run_background=options.run_background)
276 if 'start' == options.server: 279 if 'start' == options.server:
277 httpd.Start() 280 httpd.Start()
278 else: 281 else:
279 httpd.Stop(force=True) 282 httpd.Stop(force=True)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698