0

GTTF: Remove obsolete sharding_supervisor

This is a relanding of https://codereview.chromium.org/65143003/

BUG=236893

Review URL: https://codereview.chromium.org/66213009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234144 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
phajdan.jr@chromium.org
2013-11-09 22:57:14 +00:00
parent 6521714744
commit ba0a4520d2
7 changed files with 0 additions and 211 deletions

@ -1,24 +0,0 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for sharding_supervisor.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on the presubmit API built into gcl.
"""
def CommonChecks(input_api, output_api):
output = []
output.extend(input_api.canned_checks.RunPylint(input_api, output_api))
return output
def CheckChangeOnUpload(input_api, output_api):
return CommonChecks(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
output = CommonChecks(input_api, output_api)
output.extend(input_api.canned_checks.PanProjectChecks(input_api, output_api))
return output

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="AllTests" tests="" failures="" disabled="" errors="" time="">
<!-- Suite that is run entirely on shard 0 -->
<testsuite name="Suite0" tests="1" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="0" classname="Suite0" />
</testsuite>
<!-- Suite that is run entirely on shard 1 -->
<testsuite name="Suite1" tests="1" failures="" disabled="" errors="" time="">
</testsuite>
<!-- Suite that has tests run on both shard 0 and shard 1 -->
<testsuite name="Suite2" tests="2" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="0" classname="Suite2" />
</testsuite>
<!-- Suite that has a test run on both shard 0 and shard 1 -->
<testsuite name="Suite3" tests="1" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="0" classname="Suite3">
<failure message="" type="" ignored="true"></failure>
</testcase>
</testsuite>
</testsuites>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="AllTests" tests="" failures="" disabled="" errors="" time="">
<!-- See comments in gtest_results.xml0 for what the different suites represent -->
<testsuite name="Suite0" tests="1" failures="" disabled="" errors="" time="">
</testsuite>
<testsuite name="Suite1" tests="1" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="1" classname="Suite1">
<failure message="" type="" ignored="true"></failure>
</testcase>
</testsuite>
<testsuite name="Suite2" tests="2" failures="" disabled="" errors="" time="">
<testcase name="Test1" status="run" time="0" classname="Suite2" />
</testsuite>
<testsuite name="Suite3" tests="1" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="0" classname="Suite3">
<failure message="" type="" ignored="true"></failure>
</testcase>
</testsuite>
</testsuites>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="AllTests" tests="" failures="" disabled="" errors="" time="">
<!-- See comments in gtest_results.xml0 for what the different suites represent -->
<testsuite name="Suite0" tests="1" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="0" classname="Suite0" />
</testsuite>
<testsuite name="Suite1" tests="1" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="1" classname="Suite1">
<failure message="" type="" ignored="true"></failure>
</testcase>
</testsuite>
<testsuite name="Suite2" tests="2" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="0" classname="Suite2" />
<testcase name="Test1" status="run" time="0" classname="Suite2" />
</testsuite>
<testsuite name="Suite3" tests="1" failures="" disabled="" errors="" time="">
<testcase name="Test0" status="run" time="0" classname="Suite3">
<failure message="" type="" ignored="true"></failure>
<failure message="" type="" ignored="true"></failure>
</testcase>
</testsuite>
</testsuites>

@ -1,12 +0,0 @@
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Dummy test used by the sharding supervisor unittests."""
import os
total = os.environ['GTEST_TOTAL_SHARDS']
index = os.environ['GTEST_SHARD_INDEX']
print 'Running shard %s of %s' % (index, total)

@ -1,59 +0,0 @@
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Defer to --brave-new-test-launcher."""
import os
import optparse
import subprocess
import sys
def main():
parser = optparse.OptionParser()
group = optparse.OptionGroup(
parser, 'Compability flag with the old sharding_supervisor')
group.add_option(
'--no-color', action='store_true', help='Ignored')
group.add_option(
'--retry-failed', action='store_true', help='Ignored')
group.add_option(
'-t', '--timeout', type='int', help='Kept as --timeout')
group.add_option(
'--total-slaves', type='int', default=1, help='Converted to --index')
group.add_option(
'--slave-index', type='int', default=0, help='Converted to --shards')
parser.add_option_group(group)
group = optparse.OptionGroup(
parser, 'Options of run_test_cases.py passed through')
group.add_option(
'--retries', type='int', help='Kept as --retries')
group.add_option(
'-j', '--jobs', type='int', help='Number of parallel jobs')
group.add_option(
'--clusters', type='int', help='Maximum number of tests in a batch')
group.add_option(
'--verbose', action='count', default=0, help='Kept as --verbose')
parser.add_option_group(group)
parser.disable_interspersed_args()
options, args = parser.parse_args()
env = os.environ
env['GTEST_TOTAL_SHARDS'] = str(options.total_slaves)
env['GTEST_SHARD_INDEX'] = str(options.slave_index)
if options.jobs:
args.append('--test-launcher-jobs=%d' % options.jobs)
if options.clusters:
args.append('--test-launcher-batch-limit=%d' % options.clusters)
return subprocess.Popen(args + ['--brave-new-test-launcher'], env=env).wait()
if __name__ == '__main__':
sys.exit(main())

@ -1,52 +0,0 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Syncronized Standard IO Linebuffer implemented with cStringIO."""
import cStringIO
import threading
import Queue
class StdioBuffer(object):
def __init__(self, shard):
self.queue = Queue.Queue()
self.completed = 0
self.shard = shard
def _pipe_handler(self, system_pipe, program_pipe):
"""Helper method for collecting stdio output. Output is collected until
a newline is seen, at which point an event is triggered and the line is
pushed to a buffer as a (stdio, line) tuple."""
buf = cStringIO.StringIO()
pipe_running = True
while pipe_running:
char = program_pipe.read(1)
if not char and self.shard.poll() is not None:
pipe_running = False
buf.write(char)
if char == '\n' or not pipe_running:
line = buf.getvalue()
if line:
self.queue.put((system_pipe, line))
if not pipe_running:
self.queue.put((system_pipe, None))
buf.close()
buf = cStringIO.StringIO()
def handle_pipe(self, system_pipe, program_pipe):
t = threading.Thread(target=self._pipe_handler, args=[system_pipe,
program_pipe])
t.start()
return t
def readline(self):
"""Emits a tuple of (sys.stderr, line), (sys.stdout, line), or (None, None)
if the process has finished. This is a blocking call."""
while True:
(pipe, line) = self.queue.get(True)
if line:
return (pipe, line)
self.completed += 1
if self.completed >= 2:
return (None, None)