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

Unified Diff: tools/telemetry/list_telemetry_unittests

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
« no previous file with comments | « tools/telemetry/json_format ('k') | tools/telemetry/pylintrc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/list_telemetry_unittests
diff --git a/tools/telemetry/list_telemetry_unittests b/tools/telemetry/list_telemetry_unittests
deleted file mode 100755
index 56f0a0d1e7000a2b6de28c3562e6ceace5920d40..0000000000000000000000000000000000000000
--- a/tools/telemetry/list_telemetry_unittests
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 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 argparse
-import sys
-
-
-def _ExtractQueuedTestName(line):
- _, test_name, _ = line.split(' ')
- return test_name
-
-
-def _ExtractPassedTestName(line):
- _, test_name, _, _ = line.split(' ')
- return test_name
-
-
-def _IsQueued(line):
- return line.endswith(' queued')
-
-
-def _IsPassed(line):
- return 'passed' in line.split(' ')
-
-
-def _ProcessLogFile(file_path):
- passed_unittests = []
- queued_unittests = []
- with open(file_path, 'r') as f:
- for line in f:
- line = line.strip()
- if not line.startswith('['):
- continue
- if _IsQueued(line):
- queued_unittests.append(_ExtractQueuedTestName(line))
- elif _IsPassed(line):
- passed_unittests.append(_ExtractPassedTestName(line))
- queued_unittests.sort()
- passed_unittests.sort()
- return queued_unittests, passed_unittests
-
-
-def main(args):
- parser = argparse.ArgumentParser(
- description=('Process telemetry unittests log to print out passed '
- 'or queued tests.'))
- parser.add_argument(
- 'filepath', help='path to log file of telemetry unittest')
- parser.add_argument(
- '-p', '--list-passed-tests', action='store_true',
- help='List all the passed telemetry unittests')
- parser.add_argument(
- '-q', '--list-queued-tests', action='store_true',
- help='List all the queued telemetry unittests')
- options = parser.parse_args(args)
- queued_unittests, passed_unittests = _ProcessLogFile(options.filepath)
- if options.list_passed_tests:
- print 'All passed telemetry unittests:\n'
- print '\n'.join(passed_unittests)
- if options.list_queued_tests:
- print 'All queued telemetry unittests:\n'
- print '\n'.join(queued_unittests)
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv[1:]))
« no previous file with comments | « tools/telemetry/json_format ('k') | tools/telemetry/pylintrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698