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

Unified Diff: scripts/slave/runtest.py

Issue 67234: Buildbot changes for running page_cycler_http on Mac (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/buildbot/
Patch Set: '' Created 11 years, 8 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 | « config/master.chromium/master.cfg ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/runtest.py
===================================================================
--- scripts/slave/runtest.py (revision 13921)
+++ scripts/slave/runtest.py (working copy)
@@ -44,10 +44,41 @@
msg = pre + 'Unable to find %s' % test_exe_path
raise chromium_utils.PathNotFound(msg)
+ http_server = None
+ if options.document_root:
+ platform_util = google.platform_utils.PlatformUtility(build_dir)
+
+ # Name the output directory for the exe, without its path or suffix.
+ # e.g., chrome-release/httpd_logs/unit_tests/
+ test_exe_name = os.path.splitext(os.path.basename(test_exe_path))[0]
+ output_dir = os.path.join(slave_utils.SlaveBaseDir(build_dir),
+ 'httpd_logs',
+ test_exe_name)
+
+ apache_config_dir = google.httpd_utils.ApacheConfigDir(build_dir)
+ httpd_conf_path = os.path.join(apache_config_dir, 'httpd2_mac.conf')
+ mime_types_path = os.path.join(apache_config_dir, 'mime.types')
+ document_root = os.path.abspath(options.document_root)
+
+ start_cmd = platform_util.GetStartHttpdCommand(output_dir,
+ httpd_conf_path,
+ mime_types_path,
+ document_root)
+ stop_cmd = platform_util.GetStopHttpdCommand()
+ http_server = google.httpd_utils.ApacheHttpd(start_cmd, stop_cmd, [8000])
+ try:
+ http_server.StartServer()
+ except google.httpd_utils.HttpdNotStarted, e:
+ raise google.httpd_utils.HttpdNotStarted('%s. See log file in %s' %
+ (e, output_dir))
+
command = [test_exe_path]
command.extend(args[1:])
result = chromium_utils.RunCommand(command)
+ if options.document_root:
+ http_server.StopServer()
+
return result
def main_linux(options, args):
@@ -170,7 +201,7 @@
help='Shard to run. Must be between 1 and '
'total-shards.')
options, args = option_parser.parse_args()
-
+
# Set the number of shards environement variables.
if options.total_shards and options.shard_index:
os.environ['GTEST_TOTAL_SHARDS'] = str(options.total_shards)
« no previous file with comments | « config/master.chromium/master.cfg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698