# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
import argparse import json from collections import defaultdict
for run_info, tests in six.iteritems(statuses): for test, subtests in six.iteritems(tests): for name, results in six.iteritems(subtests): if results_cmp(results):
rv[run_info][test][name] = results
for run_info, tests in six.iteritems(data): for test, subtests in six.iteritems(tests): for name, results in six.iteritems(subtests): for status, number in six.iteritems(results):
rv[test][name][status] += number return rv
def print_results(data): for run_info, tests in six.iteritems(data):
run_str = ( " ".join("%s:%s" % (k, v) for k, v in run_info) if run_info else"No Run Info"
)
print(run_str)
print("=" * len(run_str))
print_run(tests)
def print_run(tests): for test, subtests in sorted(tests.items()):
print("\n" + str(test))
print("-" * len(test)) for name, results in six.iteritems(subtests):
print( "[%s]: %s"
% (
name if name isnotNoneelse"", " ".join("%s (%i)" % (k, v) for k, v in six.iteritems(results)),
)
)
def get_parser(add_help=True):
parser = argparse.ArgumentParser( "unstable",
description="List tests that don't give consistent " "results from one or more runs.",
add_help=add_help,
)
parser.add_argument( "--json", action="store_true", default=False, help="Output in JSON format"
)
parser.add_argument( "--group",
action="store_true",
default=False,
help="Group results from different run types",
)
parser.add_argument("log_file", nargs="+", help="Log files to read") return parser
def main(**kwargs):
unstable = filter_unstable(get_statuses(kwargs["log_file"])) if kwargs["group"]:
unstable = group_results(unstable)
if kwargs["json"]:
print(json.dumps(unstable)) else: ifnot kwargs["group"]:
print_results(unstable) else:
print_run(unstable)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.