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

Side by Side Diff: webkit/tools/layout_tests/run_webkit_tests.py

Issue 437063: Use apache on the Mac on V8-Latest builders as an experiment... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 #!/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 """Run layout tests using the test_shell. 6 """Run layout tests using the test_shell.
7 7
8 This is a port of the existing webkit test script run-webkit-tests. 8 This is a port of the existing webkit test script run-webkit-tests.
9 9
10 The TestRunner class runs a series of tests (TestType interface) against a set 10 The TestRunner class runs a series of tests (TestType interface) against a set
(...skipping 17 matching lines...) Expand all
28 import os 28 import os
29 import Queue 29 import Queue
30 import random 30 import random
31 import re 31 import re
32 import shutil 32 import shutil
33 import subprocess 33 import subprocess
34 import sys 34 import sys
35 import time 35 import time
36 import traceback 36 import traceback
37 37
38 from layout_package import apache_http_server
38 from layout_package import compare_failures 39 from layout_package import compare_failures
39 from layout_package import test_expectations 40 from layout_package import test_expectations
40 from layout_package import http_server 41 from layout_package import http_server
41 from layout_package import json_results_generator 42 from layout_package import json_results_generator
42 from layout_package import path_utils 43 from layout_package import path_utils
43 from layout_package import test_failures 44 from layout_package import test_failures
44 from layout_package import test_shell_thread 45 from layout_package import test_shell_thread
45 from layout_package import test_files 46 from layout_package import test_files
46 from layout_package import websocket_server 47 from layout_package import websocket_server
47 from test_types import fuzzy_image_diff 48 from test_types import fuzzy_image_diff
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 NUM_RETRY_ON_UNEXPECTED_FAILURE = 1 124 NUM_RETRY_ON_UNEXPECTED_FAILURE = 1
124 125
125 def __init__(self, options): 126 def __init__(self, options):
126 """Initialize test runner data structures. 127 """Initialize test runner data structures.
127 128
128 Args: 129 Args:
129 options: a dictionary of command line options 130 options: a dictionary of command line options
130 """ 131 """
131 self._options = options 132 self._options = options
132 133
133 self._http_server = http_server.Lighttpd(options.results_directory) 134 if options.use_apache:
135 self._http_server = apache_http_server.LayoutTestApacheHttpd(
136 options.results_directory)
137 else:
138 self._http_server = http_server.Lighttpd(options.results_directory)
139
134 self._websocket_server = websocket_server.PyWebSocket( 140 self._websocket_server = websocket_server.PyWebSocket(
135 options.results_directory) 141 options.results_directory)
136 # disable wss server. need to install pyOpenSSL on buildbots. 142 # disable wss server. need to install pyOpenSSL on buildbots.
137 # self._websocket_secure_server = websocket_server.PyWebSocket( 143 # self._websocket_secure_server = websocket_server.PyWebSocket(
138 # options.results_directory, use_tls=True, port=9323) 144 # options.results_directory, use_tls=True, port=9323)
139 145
140 # a list of TestType objects 146 # a list of TestType objects
141 self._test_types = [] 147 self._test_types = []
142 148
143 # a set of test files, and the same tests as a list 149 # a set of test files, and the same tests as a list
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 format='%(asctime)s %(filename)s:%(lineno)-3d' 1071 format='%(asctime)s %(filename)s:%(lineno)-3d'
1066 ' %(levelname)s %(message)s', 1072 ' %(levelname)s %(message)s',
1067 datefmt='%y%m%d %H:%M:%S') 1073 datefmt='%y%m%d %H:%M:%S')
1068 1074
1069 if not options.target: 1075 if not options.target:
1070 if options.debug: 1076 if options.debug:
1071 options.target = "Debug" 1077 options.target = "Debug"
1072 else: 1078 else:
1073 options.target = "Release" 1079 options.target = "Release"
1074 1080
1081 if not options.use_apache:
1082 options.use_apache = (sys.platform == 'darwin' and options.builder_name and
1083 options.builder_name.find("(V8-Latest)") != -1)
1084
1075 if options.results_directory.startswith("/"): 1085 if options.results_directory.startswith("/"):
1076 # Assume it's an absolute path and normalize. 1086 # Assume it's an absolute path and normalize.
1077 options.results_directory = path_utils.GetAbsolutePath( 1087 options.results_directory = path_utils.GetAbsolutePath(
1078 options.results_directory) 1088 options.results_directory)
1079 else: 1089 else:
1080 # If it's a relative path, make the output directory relative to Debug or 1090 # If it's a relative path, make the output directory relative to Debug or
1081 # Release. 1091 # Release.
1082 basedir = path_utils.PathFromBase('webkit') 1092 basedir = path_utils.PathFromBase('webkit')
1083 options.results_directory = path_utils.GetAbsolutePath( 1093 options.results_directory = path_utils.GetAbsolutePath(
1084 os.path.join(basedir, options.target, options.results_directory)) 1094 os.path.join(basedir, options.target, options.results_directory))
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 option_parser.add_option("", "--lint-test-files", action="store_true", 1250 option_parser.add_option("", "--lint-test-files", action="store_true",
1241 default=False, help="Makes sure the test files " 1251 default=False, help="Makes sure the test files "
1242 "parse for all configurations. Does not run any " 1252 "parse for all configurations. Does not run any "
1243 "tests.") 1253 "tests.")
1244 option_parser.add_option("", "--force", action="store_true", 1254 option_parser.add_option("", "--force", action="store_true",
1245 default=False, 1255 default=False,
1246 help="Run all tests, even those marked SKIP in the " 1256 help="Run all tests, even those marked SKIP in the "
1247 "test list") 1257 "test list")
1248 option_parser.add_option("", "--num-test-shells", 1258 option_parser.add_option("", "--num-test-shells",
1249 help="Number of testshells to run in parallel.") 1259 help="Number of testshells to run in parallel.")
1260 option_parser.add_option("", "--use-apache", action="store_true",
1261 default=False,
1262 help="Whether to use apache instead of lighttpd.")
1250 option_parser.add_option("", "--time-out-ms", default=None, 1263 option_parser.add_option("", "--time-out-ms", default=None,
1251 help="Set the timeout for each test") 1264 help="Set the timeout for each test")
1252 option_parser.add_option("", "--run-singly", action="store_true", 1265 option_parser.add_option("", "--run-singly", action="store_true",
1253 default=False, 1266 default=False,
1254 help="run a separate test_shell for each test") 1267 help="run a separate test_shell for each test")
1255 option_parser.add_option("", "--debug", action="store_true", default=False, 1268 option_parser.add_option("", "--debug", action="store_true", default=False,
1256 help="use the debug binary instead of the release " 1269 help="use the debug binary instead of the release "
1257 "binary") 1270 "binary")
1258 option_parser.add_option("", "--num-slow-tests-to-log", default=50, 1271 option_parser.add_option("", "--num-slow-tests-to-log", default=50,
1259 help="Number of slow tests whose timings to print.") 1272 help="Number of slow tests whose timings to print.")
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 "this script.")) 1328 "this script."))
1316 option_parser.add_option("", "--find-baselines", action="store_true", 1329 option_parser.add_option("", "--find-baselines", action="store_true",
1317 default=False, 1330 default=False,
1318 help="Prints a table mapping tests to their " 1331 help="Prints a table mapping tests to their "
1319 "expected results") 1332 "expected results")
1320 option_parser.add_option("", "--experimental-fully-parallel", 1333 option_parser.add_option("", "--experimental-fully-parallel",
1321 action="store_true", default=False, 1334 action="store_true", default=False,
1322 help="run all tests in parallel") 1335 help="run all tests in parallel")
1323 options, args = option_parser.parse_args() 1336 options, args = option_parser.parse_args()
1324 main(options, args) 1337 main(options, args)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698