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

Unified Diff: tools/telemetry/telemetry/testing/run_chromeos_tests.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: tools/telemetry/telemetry/testing/run_chromeos_tests.py
diff --git a/tools/telemetry/telemetry/testing/run_chromeos_tests.py b/tools/telemetry/telemetry/testing/run_chromeos_tests.py
deleted file mode 100644
index 231332186357d39cbc1d6e3f2c4ed05ced88e613..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/testing/run_chromeos_tests.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 2014 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.
-import logging
-
-from telemetry.testing import run_tests
-
-
-def RunChromeOSTests(browser_type, tests_to_run):
- """ Run ChromeOS tests.
- Args:
- |browser_type|: string specifies which browser type to use.
- |tests_to_run|: a list of tuples (top_level_dir, unit_tests), whereas
- |top_level_dir| specifies the top level directory for running tests, and
- |unit_tests| is a list of string test names to run.
- """
- stream = _LoggingOutputStream()
- error_string = ''
-
- for (top_level_dir, unit_tests) in tests_to_run:
- logging.info('Running unit tests in %s with browser_type "%s".' %
- (top_level_dir, browser_type))
-
- ret = _RunOneSetOfTests(browser_type, top_level_dir, unit_tests, stream)
- if ret:
- error_string += 'The unit tests of %s failed.\n' % top_level_dir
- return error_string
-
-
-def _RunOneSetOfTests(browser_type, top_level_dir, tests, stream):
- args = ['--browser', browser_type,
- '--top-level-dir', top_level_dir,
- '--jobs', '1',
- '--disable-logging-config'] + tests
- return run_tests.RunTestsCommand.main(args, stream=stream)
-
-
-class _LoggingOutputStream(object):
-
- def __init__(self):
- self._buffer = []
-
- def write(self, s):
- """Buffer a string write. Log it when we encounter a newline."""
- if '\n' in s:
- segments = s.split('\n')
- segments[0] = ''.join(self._buffer + [segments[0]])
- log_level = logging.getLogger().getEffectiveLevel()
- try: # TODO(dtu): We need this because of crbug.com/394571
- logging.getLogger().setLevel(logging.INFO)
- for line in segments[:-1]:
- logging.info(line)
- finally:
- logging.getLogger().setLevel(log_level)
- self._buffer = [segments[-1]]
- else:
- self._buffer.append(s)
-
- def flush(self):
- pass
« no previous file with comments | « tools/telemetry/telemetry/testing/progress_reporter_unittest.py ('k') | tools/telemetry/telemetry/testing/run_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698