Title: [251476] trunk/Tools
Revision
251476
Author
[email protected]
Date
2019-10-23 00:31:05 -0700 (Wed, 23 Oct 2019)

Log Message

prepare-ChangeLog should whine about not having tests in WebKit-only patches
https://bugs.webkit.org/show_bug.cgi?id=203027

Reviewed by Ryosuke Niwa.

* Scripts/prepare-ChangeLog:
(generateNewChangeLogs):
Put the "No new tests" or list of newly added tests in the deeper
of the WebCore or WebKit ChangeLogs, depending on which directories
the patch touches.

This is mostly intended to encourage tests for WebKit-only changes.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (251475 => 251476)


--- trunk/Tools/ChangeLog	2019-10-23 05:16:51 UTC (rev 251475)
+++ trunk/Tools/ChangeLog	2019-10-23 07:31:05 UTC (rev 251476)
@@ -1,3 +1,18 @@
+2019-10-23  Tim Horton  <[email protected]>
+
+        prepare-ChangeLog should whine about not having tests in WebKit-only patches
+        https://bugs.webkit.org/show_bug.cgi?id=203027
+
+        Reviewed by Ryosuke Niwa.
+
+        * Scripts/prepare-ChangeLog:
+        (generateNewChangeLogs):
+        Put the "No new tests" or list of newly added tests in the deeper
+        of the WebCore or WebKit ChangeLogs, depending on which directories
+        the patch touches.
+
+        This is mostly intended to encourage tests for WebKit-only changes.
+
 2019-10-22  Aakash Jain  <[email protected]>
 
         [ews] Status bubble should show previous failures if any in case patch is skipped

Modified: trunk/Tools/Scripts/prepare-ChangeLog (251475 => 251476)


--- trunk/Tools/Scripts/prepare-ChangeLog	2019-10-23 05:16:51 UTC (rev 251475)
+++ trunk/Tools/Scripts/prepare-ChangeLog	2019-10-23 07:31:05 UTC (rev 251476)
@@ -642,6 +642,13 @@
 {
     my ($prefixes, $filesInChangeLog, $addedRegressionTests, $requiresTests, $functionLists, $bugURL, $bugDescription, $bugRadarURL, $name, $emailAddress, $gitReviewer, $gitCommit, $writeChangeLogs, $delimiters) = @_;
 
+    my $hasWebCoreChange = 0;
+    foreach my $prefix (@$prefixes) {
+        if (unixPath($prefix) =~ m|/WebCore/$|) {
+            $hasWebCoreChange = 1;
+        }
+    }
+
     # Generate new ChangeLog entries and (optionally) write out new ChangeLog files.
     foreach my $prefix (@$prefixes) {
         my $endl = "\n";
@@ -688,7 +695,11 @@
         print CHANGE_LOG normalizeLineEndings("        Reviewed by $reviewer.\n\n", $endl);
         print CHANGE_LOG normalizeLineEndings($description . "\n", $endl) if $description;
 
-        if (unixPath($prefix) =~ m|/WebCore/$| || @$requiresTests) {
+        my $shouldMentionTests = @$requiresTests;
+        $shouldMentionTests |= !$hasWebCoreChange && unixPath($prefix) =~ m|/WebKit/$|;
+        $shouldMentionTests |= unixPath($prefix) =~ m|/WebCore/$|;
+
+        if ($shouldMentionTests) {
             if (@$addedRegressionTests) {
                 print CHANGE_LOG normalizeLineEndings(testListForChangeLog(sort @$addedRegressionTests), $endl);
             } else {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to