WebKit Bugzilla
Attachment 371859 Details for
Bug 198682
: import-w3c-tests should respect WEBKIT_OUTPUTDIR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198682-20190611114622.patch (text/plain), 4.61 KB, created by
youenn fablet
on 2019-06-11 11:46:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-06-11 11:46:22 PDT
Size:
4.61 KB
patch
obsolete
>Subversion Revision: 246170 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index f6d363f596b733e624d1f57bae1881578bbedd28..6b4780615ba771a4ded9759ed748c62e5f564441 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,23 @@ >+2019-06-11 Youenn Fablet <youenn@apple.com> >+ >+ import-w3c-tests should respect WEBKIT_OUTPUTDIR >+ https://bugs.webkit.org/show_bug.cgi?id=198682 >+ <rdar://problem/51536931> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Check for WEBKIT_OUTPUTDIR environment variable to compute the w3c-tests folder. >+ Made some refactoring to also teach WPTPaths users about WEBKIT_OUTPUTDIR. >+ >+ * Scripts/webkitpy/common/webkit_finder.py: >+ (WebKitFinder.path_from_webkit_outputdir): >+ * Scripts/webkitpy/w3c/common.py: >+ (WPTPaths): >+ (WPTPaths.wpt_checkout_directory): >+ (WPTPaths.wpt_checkout_path): >+ * Scripts/webkitpy/w3c/test_importer.py: >+ (TestImporter.__init__): >+ > 2019-06-06 Daniel Bates <dabates@apple.com> > > [lldb-webkit] TypeError: cannot concatenate 'str' and 'int' objects when prettify SecurityOrigin with >diff --git a/Tools/Scripts/webkitpy/common/webkit_finder.py b/Tools/Scripts/webkitpy/common/webkit_finder.py >index 7b9c0145e44d1bc342d26944b1aa49217172d66e..7d7f9e15b10a1c86e27882f57a4a725af03659ed 100644 >--- a/Tools/Scripts/webkitpy/common/webkit_finder.py >+++ b/Tools/Scripts/webkitpy/common/webkit_finder.py >@@ -26,6 +26,8 @@ > # (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 os >+ > > class WebKitFinder(object): > def __init__(self, filesystem): >@@ -52,6 +54,10 @@ class WebKitFinder(object): > def path_from_webkit_base(self, *comps): > return self._filesystem.join(self.webkit_base(), *comps) > >+ def path_from_webkit_outputdir(self, *comps): >+ base_path = os.environ['WEBKIT_OUTPUTDIR'] if 'WEBKIT_OUTPUTDIR' in os.environ else self.path_from_webkit_base('WebKitBuild') >+ return self._filesystem.join(base_path, *comps) >+ > def path_to_script(self, script_name): > """Returns the relative path to the script from the top of the WebKit tree.""" > # This is intentionally relative in order to force callers to consider what >diff --git a/Tools/Scripts/webkitpy/w3c/common.py b/Tools/Scripts/webkitpy/w3c/common.py >index f823cfae30d6ace4cdc764756823aa26ae1ab860..c33a39957fe19abcd3efb024c326e4452165d640 100644 >--- a/Tools/Scripts/webkitpy/w3c/common.py >+++ b/Tools/Scripts/webkitpy/w3c/common.py >@@ -101,13 +101,13 @@ def is_file_exportable(path): > > > class WPTPaths: >- CHECKOUT_DIRECTORY = ["WebKitBuild", "w3c-tests"] >- WPT_CHECKOUT_PATH = CHECKOUT_DIRECTORY + ["web-platform-tests"] >+ CHECKOUT_DIRECTORY = ["w3c-tests"] >+ CHECKOUT_PATH = CHECKOUT_DIRECTORY + ["web-platform-tests"] > > @staticmethod >- def checkout_directory(finder): >- return finder.path_from_webkit_base(*WPTPaths.CHECKOUT_DIRECTORY) >+ def wpt_checkout_directory(finder): >+ return finder.path_from_webkit_outputdir(*WPTPaths.CHECKOUT_DIRECTORY) > > @staticmethod > def wpt_checkout_path(finder): >- return finder.path_from_webkit_base(*WPTPaths.WPT_CHECKOUT_PATH) >+ return finder.path_from_webkit_outputdir(*WPTPaths.CHECKOUT_PATH) >diff --git a/Tools/Scripts/webkitpy/w3c/test_importer.py b/Tools/Scripts/webkitpy/w3c/test_importer.py >index e874808acbd07f1b9fbd587e5570a94a5da4a8ba..59352035a6d4ef3f46470cf5a30b8a6553f7ba31 100644 >--- a/Tools/Scripts/webkitpy/w3c/test_importer.py >+++ b/Tools/Scripts/webkitpy/w3c/test_importer.py >@@ -75,11 +75,12 @@ import argparse > import json > import logging > import mimetypes >+import os > > from webkitpy.common.host import Host > from webkitpy.common.system.filesystem import FileSystem > from webkitpy.common.webkit_finder import WebKitFinder >-from webkitpy.w3c.common import WPT_GH_URL >+from webkitpy.w3c.common import WPT_GH_URL, WPTPaths > from webkitpy.w3c.test_parser import TestParser > from webkitpy.w3c.test_converter import convert_for_webkit > from webkitpy.w3c.test_downloader import TestDownloader >@@ -169,7 +170,7 @@ class TestImporter(object): > self.tests_w3c_relative_path = self.filesystem.join('imported', 'w3c') > self.layout_tests_path = webkit_finder.path_from_webkit_base('LayoutTests') > self.layout_tests_w3c_path = self.filesystem.join(self.layout_tests_path, self.tests_w3c_relative_path) >- self.tests_download_path = webkit_finder.path_from_webkit_base('WebKitBuild', 'w3c-tests') >+ self.tests_download_path = WPTPaths.wpt_checkout_directory(webkit_finder) > > self._test_downloader = None >
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 198682
:
371859
|
371862
|
371971