Changeset 246434 in webkit
- Timestamp:
- Jun 14, 2019 8:53:55 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r246429 r246434 1 2019-06-14 Youenn Fablet <youenn@apple.com> 2 3 import-w3c-tests should respect WEBKIT_OUTPUTDIR 4 https://bugs.webkit.org/show_bug.cgi?id=198682 5 <rdar://problem/51536931> 6 7 Reviewed by Jonathan Bedard. 8 9 Check for WEBKIT_OUTPUTDIR environment variable to compute the w3c-tests folder. 10 Made some refactoring to also teach WPTPaths users about WEBKIT_OUTPUTDIR. 11 12 * Scripts/webkitpy/common/webkit_finder.py: 13 (WebKitFinder.path_from_webkit_outputdir): 14 * Scripts/webkitpy/w3c/common.py: 15 (WPTPaths): 16 (WPTPaths.checkout_directory): 17 (WPTPaths.wpt_checkout_path): 18 * Scripts/webkitpy/w3c/test_importer.py: 19 (TestImporter.__init__): 20 * Scripts/webkitpy/w3c/test_importer_unittest.py: 21 (test_checkout_directory): 22 1 23 2019-06-13 Antoine Quint <graouts@apple.com> 2 24 -
trunk/Tools/Scripts/webkitpy/common/webkit_finder.py
r138491 r246434 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 import os 30 29 31 30 32 class WebKitFinder(object): … … 53 55 return self._filesystem.join(self.webkit_base(), *comps) 54 56 57 def path_from_webkit_outputdir(self, *comps): 58 base_path = os.environ['WEBKIT_OUTPUTDIR'] if 'WEBKIT_OUTPUTDIR' in os.environ else self.path_from_webkit_base('WebKitBuild') 59 return self._filesystem.join(base_path, *comps) 60 55 61 def path_to_script(self, script_name): 56 62 """Returns the relative path to the script from the top of the WebKit tree.""" -
trunk/Tools/Scripts/webkitpy/w3c/common.py
r232746 r246434 102 102 103 103 class WPTPaths: 104 CHECKOUT_DIRECTORY = [" WebKitBuild", "w3c-tests"]104 CHECKOUT_DIRECTORY = ["w3c-tests"] 105 105 WPT_CHECKOUT_PATH = CHECKOUT_DIRECTORY + ["web-platform-tests"] 106 106 107 107 @staticmethod 108 108 def checkout_directory(finder): 109 return finder.path_from_webkit_ base(*WPTPaths.CHECKOUT_DIRECTORY)109 return finder.path_from_webkit_outputdir(*WPTPaths.CHECKOUT_DIRECTORY) 110 110 111 111 @staticmethod 112 112 def wpt_checkout_path(finder): 113 return finder.path_from_webkit_ base(*WPTPaths.WPT_CHECKOUT_PATH)113 return finder.path_from_webkit_outputdir(*WPTPaths.WPT_CHECKOUT_PATH) -
trunk/Tools/Scripts/webkitpy/w3c/test_importer.py
r245287 r246434 80 80 from webkitpy.common.system.filesystem import FileSystem 81 81 from webkitpy.common.webkit_finder import WebKitFinder 82 from webkitpy.w3c.common import WPT_GH_URL 82 from webkitpy.w3c.common import WPT_GH_URL, WPTPaths 83 83 from webkitpy.w3c.test_parser import TestParser 84 84 from webkitpy.w3c.test_converter import convert_for_webkit … … 170 170 self.layout_tests_path = webkit_finder.path_from_webkit_base('LayoutTests') 171 171 self.layout_tests_w3c_path = self.filesystem.join(self.layout_tests_path, self.tests_w3c_relative_path) 172 self.tests_download_path = webkit_finder.path_from_webkit_base('WebKitBuild', 'w3c-tests')172 self.tests_download_path = WPTPaths.checkout_directory(webkit_finder) 173 173 174 174 self._test_downloader = None -
trunk/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
r245287 r246434 26 26 # SUCH DAMAGE. 27 27 28 import os 28 29 import unittest 29 30 … … 210 211 self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/dir-to-skip/test-to-skip.html')) 211 212 213 def test_checkout_directory(self): 214 FAKE_FILES = { 215 '/mock-checkout/WebKitBuild2/w3c-tests/web-platform-tests/existing-test.html': '', 216 '/mock-checkout/WebKitBuild2/w3c-tests/csswg-tests/test.html': '1', 217 } 218 219 FAKE_FILES.update(FAKE_REPOSITORY) 220 221 os.environ['WEBKIT_OUTPUTDIR'] = '/mock-checkout/WebKitBuild2' 222 try: 223 fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES) 224 finally: 225 del os.environ['WEBKIT_OUTPUTDIR'] 226 227 self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/web-platform-tests/existing-test.html')) 228 212 229 def test_clean_directory_option(self): 213 230 FAKE_FILES = {
Note: See TracChangeset
for help on using the changeset viewer.