summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/common/net/layouttestresults.py
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Tools/Scripts/webkitpy/common/net/layouttestresults.py
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Tools/Scripts/webkitpy/common/net/layouttestresults.py')
-rw-r--r--Tools/Scripts/webkitpy/common/net/layouttestresults.py91
1 files changed, 0 insertions, 91 deletions
diff --git a/Tools/Scripts/webkitpy/common/net/layouttestresults.py b/Tools/Scripts/webkitpy/common/net/layouttestresults.py
deleted file mode 100644
index b8cb15769..000000000
--- a/Tools/Scripts/webkitpy/common/net/layouttestresults.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright (c) 2010, Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import logging
-
-from webkitpy.common.net.resultsjsonparser import ResultsJSONParser
-from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, SoupStrainer
-from webkitpy.layout_tests.models import test_results
-from webkitpy.layout_tests.models import test_failures
-
-_log = logging.getLogger(__name__)
-
-
-# FIXME: This should be unified with all the layout test results code in the layout_tests package
-# This doesn't belong in common.net, but we don't have a better place for it yet.
-def path_for_layout_test(test_name):
- return "LayoutTests/%s" % test_name
-
-
-# FIXME: This should be unified with ResultsSummary or other NRWT layout tests code
-# in the layout_tests package.
-# This doesn't belong in common.net, but we don't have a better place for it yet.
-class LayoutTestResults(object):
- @classmethod
- def results_from_string(cls, string):
- if not string:
- return None
- test_results = ResultsJSONParser.parse_results_json(string)
- if not test_results:
- return None
- return cls(test_results)
-
- def __init__(self, test_results):
- self._test_results = test_results
- self._failure_limit_count = None
- self._unit_test_failures = []
-
- # FIXME: run-webkit-tests should store the --exit-after-N-failures value
- # (or some indication of early exit) somewhere in the results.json
- # file. Until it does, callers should set the limit to
- # --exit-after-N-failures value used in that run. Consumers of LayoutTestResults
- # may use that value to know if absence from the failure list means PASS.
- # https://bugs.webkit.org/show_bug.cgi?id=58481
- def set_failure_limit_count(self, limit):
- self._failure_limit_count = limit
-
- def failure_limit_count(self):
- return self._failure_limit_count
-
- def test_results(self):
- return self._test_results
-
- def results_matching_failure_types(self, failure_types):
- return [result for result in self._test_results if result.has_failure_matching_types(*failure_types)]
-
- def tests_matching_failure_types(self, failure_types):
- return [result.test_name for result in self.results_matching_failure_types(failure_types)]
-
- def failing_test_results(self):
- return self.results_matching_failure_types(test_failures.ALL_FAILURE_CLASSES)
-
- def failing_tests(self):
- return [result.test_name for result in self.failing_test_results()] + self._unit_test_failures
-
- def add_unit_test_failures(self, unit_test_results):
- self._unit_test_failures = unit_test_results