WebKit Bugzilla
Attachment 342929 Details for
Bug 186755
: [webkitpy] WPTRunner should remove any metadata content before (re)generating it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-186755-20180618154544.patch (text/plain), 3.39 KB, created by
Zan Dobersek
on 2018-06-18 06:45:45 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2018-06-18 06:45:45 PDT
Size:
3.39 KB
patch
obsolete
>Subversion Revision: 232923 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 2f6a513bb01d03f9329186c2e7c716f414daa060..c65cefb4ea40db1a17ede7ec78bb8a539d46280e 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,26 @@ >+2018-06-18 Zan Dobersek <zdobersek@igalia.com> >+ >+ [webkitpy] WPTRunner should remove any metadata content before (re)generating it >+ https://bugs.webkit.org/show_bug.cgi?id=186755 >+ >+ Reviewed by Carlos Garcia Campos. >+ >+ WPTRunner generates the WPT-compliant metadata content before each test >+ run. Before it does so, it should remove the complete target directory >+ for this metadata, allowing any change in the expectations JSON to be >+ immediately reflected. >+ >+ For example, if a test failure expectation is removed, the related .ini >+ metadata file is not generated anymore, but the stale .ini file isn't >+ removed from the current metadata directory. To avoid this, purging >+ the metadata directory and regenerating it from scratch should be done >+ for each test run. >+ >+ * Scripts/webkitpy/w3c/wpt_runner.py: >+ (WPTRunner._generate_metadata_directory): >+ * Scripts/webkitpy/w3c/wpt_runner_unittest.py: >+ (WPTRunnerTest.test_generate_metadata_directory): >+ > 2018-06-12 Darin Adler <darin@apple.com> > > [Cocoa] Make some RetainPtr refinements to get more ready for ARC >diff --git a/Tools/Scripts/webkitpy/w3c/wpt_runner.py b/Tools/Scripts/webkitpy/w3c/wpt_runner.py >index 22a528a4aaa63c725cfdada20e4b7216d779d3a5..94c52a3038b5d5b2315d6b5ab6550811bea3d285 100644 >--- a/Tools/Scripts/webkitpy/w3c/wpt_runner.py >+++ b/Tools/Scripts/webkitpy/w3c/wpt_runner.py >@@ -146,6 +146,8 @@ class WPTRunner(object): > with self._host.filesystem.open_text_file_for_reading(expectations_file) as fd: > expectations = json.load(fd) > >+ self._host.filesystem.rmtree(metadata_path) >+ > for test_name, test_data in expectations.iteritems(): > ini_file = self._host.filesystem.join(metadata_path, test_name + ".ini") > self._host.filesystem.maybe_make_directory(self._host.filesystem.dirname(ini_file)) >diff --git a/Tools/Scripts/webkitpy/w3c/wpt_runner_unittest.py b/Tools/Scripts/webkitpy/w3c/wpt_runner_unittest.py >index da399bf261f95e88d460fbbd7bf2701a27966bb6..a27dd60fd05700560ee570be4182145a0e0d315f 100644 >--- a/Tools/Scripts/webkitpy/w3c/wpt_runner_unittest.py >+++ b/Tools/Scripts/webkitpy/w3c/wpt_runner_unittest.py >@@ -191,7 +191,16 @@ class WPTRunnerTest(unittest.TestCase): > "/mock-checkout/WebPlatformTests/MockPort/TestExpectations.json", > TEST_EXPECTATIONS_JSON_CONTENT) > >+ # Specify a stale metadata file that should be removed before generation. >+ stale_metadata_file = "/mock-metadata/test/stale_metadata_file.html.ini" >+ instance.host.filesystem.write_text_file( >+ stale_metadata_file, "[This file should be removed during generation]") >+ > self.assertTrue(instance.runner._generate_metadata_directory(metadata_path)) >+ >+ # Check that the stale metadata file was indeed removed. >+ self.assertFalse(instance.host.filesystem.exists(stale_metadata_file)) >+ > for path, content in EXPECTED_TEST_MANIFESTS.items(): > manifest_path = instance.host.filesystem.join(metadata_path, path) > self.assertTrue(instance.host.filesystem.isfile(manifest_path))
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 186755
:
342921
|
342926
| 342929