diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-09 22:57:14 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-09 22:57:14 +0000 |
commit | ba0a4520d290ee2476f1a8691098af6ff8aedad3 (patch) | |
tree | 3b6e6627a2183368592d33041eb347053139aaf1 | |
parent | 6521714744df0071bd8ba0553c990b2f1d669355 (diff) | |
download | chromium_src-ba0a4520d290ee2476f1a8691098af6ff8aedad3.zip chromium_src-ba0a4520d290ee2476f1a8691098af6ff8aedad3.tar.gz chromium_src-ba0a4520d290ee2476f1a8691098af6ff8aedad3.tar.bz2 |
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
-rw-r--r-- | tools/sharding_supervisor/PRESUBMIT.py | 24 | ||||
-rw-r--r-- | tools/sharding_supervisor/data/gtest_results.xml0 | 23 | ||||
-rw-r--r-- | tools/sharding_supervisor/data/gtest_results.xml1 | 19 | ||||
-rw-r--r-- | tools/sharding_supervisor/data/gtest_results_expected.xml | 22 | ||||
-rwxr-xr-x | tools/sharding_supervisor/dummy_test.py | 12 | ||||
-rwxr-xr-x | tools/sharding_supervisor/sharding_supervisor.py | 59 | ||||
-rw-r--r-- | tools/sharding_supervisor/stdio_buffer.py | 52 |
7 files changed, 0 insertions, 211 deletions
diff --git a/tools/sharding_supervisor/PRESUBMIT.py b/tools/sharding_supervisor/PRESUBMIT.py deleted file mode 100644 index 2e12d77..0000000 --- a/tools/sharding_supervisor/PRESUBMIT.py +++ /dev/null @@ -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 diff --git a/tools/sharding_supervisor/data/gtest_results.xml0 b/tools/sharding_supervisor/data/gtest_results.xml0 deleted file mode 100644 index f6bf83a..0000000 --- a/tools/sharding_supervisor/data/gtest_results.xml0 +++ /dev/null @@ -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> diff --git a/tools/sharding_supervisor/data/gtest_results.xml1 b/tools/sharding_supervisor/data/gtest_results.xml1 deleted file mode 100644 index 6d8bef8..0000000 --- a/tools/sharding_supervisor/data/gtest_results.xml1 +++ /dev/null @@ -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> diff --git a/tools/sharding_supervisor/data/gtest_results_expected.xml b/tools/sharding_supervisor/data/gtest_results_expected.xml deleted file mode 100644 index 7af04d4..0000000 --- a/tools/sharding_supervisor/data/gtest_results_expected.xml +++ /dev/null @@ -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> diff --git a/tools/sharding_supervisor/dummy_test.py b/tools/sharding_supervisor/dummy_test.py deleted file mode 100755 index 4b1d019..0000000 --- a/tools/sharding_supervisor/dummy_test.py +++ /dev/null @@ -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) diff --git a/tools/sharding_supervisor/sharding_supervisor.py b/tools/sharding_supervisor/sharding_supervisor.py deleted file mode 100755 index 20d7db7..0000000 --- a/tools/sharding_supervisor/sharding_supervisor.py +++ /dev/null @@ -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()) diff --git a/tools/sharding_supervisor/stdio_buffer.py b/tools/sharding_supervisor/stdio_buffer.py deleted file mode 100644 index d16220a..0000000 --- a/tools/sharding_supervisor/stdio_buffer.py +++ /dev/null @@ -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) |