WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
proposed patch
proposed-patch.patch (text/plain), 3.71 KB, created by
Philippe Normand
on 2010-07-22 09:24:49 PDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Philippe Normand
Created:
2010-07-22 09:24:49 PDT
Size:
3.71 KB
patch
obsolete
>From 897fdecdbb480837f17f477bf6c80bde4aadc17d Mon Sep 17 00:00:00 2001 >From: Philippe Normand <pnormand@igalia.com> >Date: Thu, 22 Jul 2010 18:24:23 +0200 >Subject: [PATCH] proposed patch > >--- > WebKitTools/ChangeLog | 11 +++++ > .../Scripts/webkitpy/tool/commands/queries.py | 46 ++++++++++++++++++++ > 2 files changed, 57 insertions(+), 0 deletions(-) > >diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog >index 26cf151..924fc56 100644 >--- a/WebKitTools/ChangeLog >+++ b/WebKitTools/ChangeLog >@@ -1,3 +1,14 @@ >+2010-07-22 Philippe Normand <pnormand@igalia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ webkit-patch command to find the ports covering a specific layout test >+ https://bugs.webkit.org/show_bug.cgi?id=42832 >+ >+ To use it: webkit-patch what-covers some/layout/test.html >+ >+ * Scripts/webkitpy/tool/commands/queries.py: >+ > 2010-07-21 Darin Adler <darin@apple.com> > > Reviewed by Sam Weinig. >diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queries.py b/WebKitTools/Scripts/webkitpy/tool/commands/queries.py >index 91ce5e9..903f13d 100644 >--- a/WebKitTools/Scripts/webkitpy/tool/commands/queries.py >+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queries.py >@@ -29,6 +29,7 @@ > > > from optparse import make_option >+import os > > from webkitpy.common.checkout.commitinfo import CommitInfo > from webkitpy.common.config.committers import CommitterList >@@ -284,3 +285,48 @@ and displayes the status of each builder.""" > for builder in tool.buildbot.builder_statuses(): > status_string = "ok" if builder["is_green"] else "FAIL" > print "%s : %s" % (status_string.ljust(4), builder["name"]) >+ >+class WhatCovers(AbstractDeclarativeCommand): >+ name = "what-covers" >+ help_text = "Print the list of ports not skipping given test(s)" >+ long_help = """Scans the the Skipped file of each port and figure >+out what ports cover the test(s). Categories are taken in account too.""" >+ argument_names = "TEST_NAME" >+ >+ def _find_tests_in_skipped(self, tests, skipped_file): >+ tests_skipped = [] >+ >+ # All tests or categories of tests skipped. >+ skipped_tests = [ line.strip() for line in open(skipped_file).readlines() >+ if line.strip() and not line.startswith("#") ] >+ >+ # Find if a test is skipped by using direct match or category matching. >+ for test_name in tests: >+ for skipped_test in skipped_tests: >+ if skipped_test == test_name: >+ tests_skipped.append(test_name) >+ break >+ else: >+ basename, extension = os.path.splitext(skipped_test) >+ # this is a test category >+ if not extension and test_name.startswith(basename): >+ tests_skipped.append(test_name) >+ break >+ >+ return [i for i in tests if i not in tests_skipped] >+ >+ def execute(self, options, args, tool): >+ platform_directory = os.path.join(tool.scm().cwd, "LayoutTests", "platform") >+ results = dict([(test, []) for test in args]) >+ for port_name in os.listdir(platform_directory): >+ skipped_file = os.path.join(platform_directory, port_name, "Skipped") >+ if not os.path.isfile(skipped_file): >+ continue >+ for test_name in self._find_tests_in_skipped(args, skipped_file): >+ results[test_name].append(port_name) >+ >+ for test_name, ports in results.iteritems(): >+ if ports: >+ print "Ports covering test %r: %s" % (test_name, ', '.join(ports)) >+ else: >+ print "Test %r is not covered by any port." % test_name >-- >1.7.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 42832
:
62307
|
62309
|
62404
|
62405
|
66653
|
66655
|
66656
|
66689