Changeset 232746 in webkit
- Timestamp:
- Jun 12, 2018 12:55:42 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r232744 r232746 1 2018-06-12 Zan Dobersek <zdobersek@igalia.com> 2 3 Add run-web-platform-tests script 4 https://bugs.webkit.org/show_bug.cgi?id=183356 5 6 Reviewed by Carlos Alberto Lopez Perez. 7 8 Store port-specific test expectations and test manifest files for the 9 web-platform-tests test runs under the top-level WebPlatformTests 10 directory. 11 12 TestExpectations.json file lists all the failing or disabled tests 13 or subtests that are to be expected in the test run. This information is 14 parsed in the run-web-platform-tests script and used to build 15 test-specific metadata files (ending with .ini) inside a temporary 16 directory that is then used during the test run. JSON format is used to 17 follow the WebDriver test suite in how it manages expectations, and to 18 avoid having to manually manage .ini files for every deviant test case. 19 20 TestManifest.ini file is used to fine-tune which tests are to be enabled 21 by default. For the GTK+ port, we currently disable all tests by default 22 but then specifically enable tests under the 2dcontext and WebCryptoAPI 23 directories. This will allow for gradual enabling of further tests. 24 25 * WebPlatformTests/gtk/TestExpectations.json: Added. 26 * WebPlatformTests/gtk/TestManifest.ini: Added. 27 1 28 2018-06-11 Carlos Garcia Campos <cgarcia@igalia.com> 2 29 -
trunk/Tools/ChangeLog
r232733 r232746 1 2018-06-12 Zan Dobersek <zdobersek@igalia.com> 2 3 Add run-web-platform-tests script 4 https://bugs.webkit.org/show_bug.cgi?id=183356 5 6 Reviewed by Carlos Alberto Lopez Perez. 7 8 Add the run-web-platform-tests script that allows running WebKit builds 9 against the external web-platform-tests project. 10 11 The script sets up all the port-specific information, including the 12 display driver. If no web-platform-tests repository location is 13 specified, the TestDownloader utility is used to clone the repository, 14 and path to that clone is leveraged instead. 15 16 Port-specific TestManifest.ini and TestExpectations.json file paths are 17 then constructed, bailing if any of the files is missing. The JSON file 18 is then used to construct the metadata file tree, creating an .ini file 19 for each test that is disabled, has a certain expectation, or has 20 subtests that themselves have certain expectations. This metadata tree 21 is built under the build directory, and is purged and reconstructed for 22 each separate run. 23 24 Lastly, the WPT python module is imported from the web-platform-tests 25 source location, and wpt.main() is invoked along with all the necessary 26 arguments that set up a web-platform-tests suite run using the WebKit 27 product. 28 29 * Scripts/run-web-platform-tests: Added. 30 * Scripts/webkitpy/common/config/ports_mock.py: 31 (MockPort.run_bindings_tests_command): 32 (MockPort): 33 (MockPort.wpt_metadata_directory): 34 (MockPort.wpt_manifest_file): 35 * Scripts/webkitpy/port/base.py: 36 (Port.wpt_metadata_directory): 37 (Port): 38 (Port.wpt_manifest_file): 39 * Scripts/webkitpy/w3c/common.py: 40 (is_file_exportable): 41 (WPTPaths): 42 (WPTPaths.checkout_directory): 43 (WPTPaths.wpt_checkout_path): 44 * Scripts/webkitpy/w3c/test_downloader.py: 45 (TestDownloader.clone_tests): 46 (TestDownloader): 47 (TestDownloader.download_tests): 48 * Scripts/webkitpy/w3c/test_exporter.py: 49 (WebPlatformTestExporter.__init__): 50 * Scripts/webkitpy/w3c/wpt_runner.py: Added. 51 (main): 52 (parse_args): 53 (create_webdriver): 54 (spawn_wpt): 55 (WPTRunner): 56 (WPTRunner.__init__): 57 (WPTRunner._prepare_wpt_checkout): 58 (WPTRunner._generate_metadata_directory): 59 (WPTRunner.run): 60 * Scripts/webkitpy/w3c/wpt_runner_unittest.py: Added. 61 (WPTRunnerTest): 62 (WPTRunnerTest.MockTestDownloader): 63 (WPTRunnerTest.MockTestDownloader.default_options): 64 (WPTRunnerTest.MockTestDownloader.__init__): 65 (WPTRunnerTest.MockTestDownloader.clone_tests): 66 (WPTRunnerTest.MockWebDriver): 67 (WPTRunnerTest.MockWebDriver.create): 68 (WPTRunnerTest.MockWebDriver.binary_path): 69 (WPTRunnerTest.MockWebDriver.browser_path): 70 (WPTRunnerTest.MockWebDriver.browser_args): 71 (WPTRunnerTest.MockSpawnWPT): 72 (WPTRunnerTest.MockSpawnWPT.__init__): 73 (WPTRunnerTest.MockSpawnWPT.__call__): 74 (WPTRunnerTest.TestInstance): 75 (WPTRunnerTest.TestInstance.__init__): 76 (WPTRunnerTest.TestInstance.prepare_mock_files_for_run): 77 (WPTRunnerTest.test_prepare_wpt_checkout): 78 (WPTRunnerTest.test_prepare_wpt_checkout_specified_path): 79 (WPTRunnerTest.test_generate_metadata_directory): 80 (WPTRunnerTest.test_run): 81 (WPTRunnerTest.test_run_with_specified_options): 82 (WPTRunnerTest.test_run_with_args): 83 1 84 2018-06-11 Mark Lam <mark.lam@apple.com> 2 85 -
trunk/Tools/Scripts/webkitpy/common/config/ports_mock.py
r212579 r232746 59 59 def run_bindings_tests_command(self): 60 60 return ['mock-run-bindings-tests'] 61 62 def wpt_metadata_directory(self): 63 return '/mock-path/mock-wpt-tests-metadata' 64 65 def wpt_manifest_file(self): 66 return '/mock-path/mock-wpt-manifest.json' -
trunk/Tools/Scripts/webkitpy/port/base.py
r232711 r232746 872 872 return self._build_path('layout-test-results') 873 873 874 def wpt_metadata_directory(self): 875 return self._build_path('web-platform-tests-metadata') 876 877 def wpt_manifest_file(self): 878 return self._build_path('web-platform-tests-manifest.json') 879 874 880 def setup_test_run(self, device_class=None): 875 881 """Perform port-specific work at the beginning of a test run.""" -
trunk/Tools/Scripts/webkitpy/w3c/common.py
r232389 r232746 99 99 basename = path[path.rfind('/') + 1:] 100 100 return not is_basename_skipped(basename) 101 102 103 class WPTPaths: 104 CHECKOUT_DIRECTORY = ["WebKitBuild", "w3c-tests"] 105 WPT_CHECKOUT_PATH = CHECKOUT_DIRECTORY + ["web-platform-tests"] 106 107 @staticmethod 108 def checkout_directory(finder): 109 return finder.path_from_webkit_base(*WPTPaths.CHECKOUT_DIRECTORY) 110 111 @staticmethod 112 def wpt_checkout_path(finder): 113 return finder.path_from_webkit_base(*WPTPaths.WPT_CHECKOUT_PATH) -
trunk/Tools/Scripts/webkitpy/w3c/test_downloader.py
r215670 r232746 220 220 self._filesystem.write_text_file(self._filesystem.join(destination_directory, test_repository['name'], '.gitignore'), '\n'.join(rules)) 221 221 222 def download_tests(self, destination_directory, test_paths=[], use_tip_of_tree=False):222 def clone_tests(self, use_tip_of_tree=False): 223 223 for test_repository in self.test_repositories: 224 224 self.checkout_test_repository(test_repository['revision'] if not use_tip_of_tree else 'origin/master', test_repository['url'], self._filesystem.join(self.repository_directory, test_repository['name'])) 225 226 def download_tests(self, destination_directory, test_paths=[], use_tip_of_tree=False): 227 self.clone_tests(use_tip_of_tree) 225 228 self.copy_tests(destination_directory, test_paths) -
trunk/Tools/Scripts/webkitpy/w3c/test_exporter.py
r232398 r232746 38 38 from webkitpy.w3c.wpt_github import WPTGitHub 39 39 from webkitpy.w3c.wpt_linter import WPTLinter 40 from webkitpy.w3c.common import WPT_GH_ORG, WPT_GH_REPO_NAME, WPT_GH_URL 40 from webkitpy.w3c.common import WPT_GH_ORG, WPT_GH_REPO_NAME, WPT_GH_URL, WPTPaths 41 41 from webkitpy.common.memoized import memoized 42 42 … … 70 70 if not self._options.repository_directory: 71 71 webkit_finder = WebKitFinder(self._filesystem) 72 self._options.repository_directory = webkit_finder.path_from_webkit_base('WebKitBuild', 'w3c-tests', 'web-platform-tests')72 self._options.repository_directory = WPTPaths.wpt_checkout_path(webkit_finder) 73 73 74 74 self._linter = WPTLinterClass(self._options.repository_directory, host.filesystem)
Note: See TracChangeset
for help on using the changeset viewer.