Add Mojave support to WebKit tools
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Jun 2018 22:49:02 +0000 (22:49 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Jun 2018 22:49:02 +0000 (22:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186282

Reviewed by Daniel Bates.

Tools:

Nightly build support will be added separately.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave@2x.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
Added dashboard support.

* BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
* BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
Trigger the right build queues on check-in.

* Scripts/webkitpy/common/version_name_map.py:
* Scripts/webkitpy/common/version_name_map_unittest.py:
The main version mapping class updated.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
* Scripts/webkitpy/port/mac_unittest.py:
Updated for more platforms in unit tests.

* TestResultServer/static-dashboards/flakiness_dashboard.js:
Added the new platform to flakiness dashboard.

LayoutTests:

* platform/mac-mojave: Added an empty directory to avoid breaking scripts.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232483 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
LayoutTests/ChangeLog
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave.png [new file with mode: 0644]
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave@2x.png [new file with mode: 0644]
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css
Tools/BuildSlaveSupport/build.webkit.org-config/wkbuild.py
Tools/BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py
Tools/ChangeLog
Tools/Scripts/webkitpy/common/version_name_map.py
Tools/Scripts/webkitpy/common/version_name_map_unittest.py
Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
Tools/Scripts/webkitpy/port/mac_unittest.py
Tools/TestResultServer/static-dashboards/flakiness_dashboard.js

index 0c63ccd..ef16681 100644 (file)
@@ -1,3 +1,12 @@
+2018-06-04  Alexey Proskuryakov  <ap@apple.com>
+
+        Add Mojave support to WebKit tools
+        https://bugs.webkit.org/show_bug.cgi?id=186282
+
+        Reviewed by Daniel Bates.
+
+        * platform/mac-mojave: Added an empty directory to avoid breaking scripts.
+
 2018-06-04  Daniel Bates  <dabates@apple.com>
 
         Update Strong Password appearance
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave.png b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave.png
new file mode 100644 (file)
index 0000000..2ccaebf
Binary files /dev/null and b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave.png differ
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave@2x.png b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave@2x.png
new file mode 100644 (file)
index 0000000..2ca91cb
Binary files /dev/null and b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave@2x.png differ
index faed7b6..35d657f 100644 (file)
@@ -25,6 +25,7 @@
 
 Dashboard = {
     Platform: {
+        macOSMojave: { name: "macos-mojave", readableName: "macOS Mojave", order: 6 },
         macOSHighSierra: { name: "macos-highsierra", readableName: "macOS High Sierra", order: 7 },
         macOSSierra: { name: "macos-sierra", readableName: "macOS Sierra", order: 8 },
         iOS11Simulator: { name: "ios-simulator-11", readableName: "iOS 11 Simulator", order: 20 },
index 97a81e6..9758be0 100644 (file)
@@ -188,6 +188,10 @@ table.queue-grid tr.platform.macos-highsierra img.logo {
     content: -webkit-image-set(url(../Images/HighSierra@2x.png) 2x, url(../Images/HighSierra.png) 1x);
 }
 
+table.queue-grid tr.platform.macos-mojave img.logo {
+    content: -webkit-image-set(url(../Images/Mojave@2x.png) 2x, url(../Images/Mojave.png) 1x);
+}
+
 table.queue-grid tr.platform.windows-8 img.logo {
     content: -webkit-image-set(url(../Images/Windows8@2x.png) 2x, url(../Images/Windows8.png) 1x);
 }
index b960022..5be43a0 100644 (file)
@@ -37,7 +37,7 @@ def _should_file_trigger_build(target_platform, file):
     # and start using it for their bots. Someone familiar with each platform
     # will have to figure out what the right set of directories/patterns is for
     # that platform.
-    assert(target_platform in ("mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "win", "ios-11", "ios-simulator-11"))
+    assert(target_platform in ("mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "win", "ios-11", "ios-simulator-11"))
 
     directories = [
         # Directories that shouldn't trigger builds on any bots.
@@ -59,6 +59,7 @@ def _should_file_trigger_build(target_platform, file):
         ("LayoutTests/platform/mac-elcapitan", ["mac-yosemite", "mac-elcapitan"]),
         ("LayoutTests/platform/mac-sierra", ["mac-yosemite", "mac-elcapitan", "mac-sierra"]),
         ("LayoutTests/platform/mac-highsierra", ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra"]),
+        ("LayoutTests/platform/mac-mojave", ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave"]),
         ("LayoutTests/platform/mac-wk2", ["mac"]),
         ("LayoutTests/platform/mac-wk1", ["mac"]),
         ("LayoutTests/platform/mac", ["mac", "win"]),
index 0e63aa8..8ff6589 100644 (file)
@@ -29,8 +29,8 @@ class ShouldBuildTest(unittest.TestCase):
         (["ChangeLog", "Source/WebCore/ChangeLog", "Source/WebKit/ChangeLog-2011-02-11"], []),
         (["Websites/bugs.webkit.org/foo", "Source/WebCore/bar"], ["*"]),
         (["Websites/bugs.webkit.org/foo"], []),
-        (["Source/JavaScriptCore/JavaScriptCore.xcodeproj/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "ios-11", "ios-simulator-11"]),
-        (["Source/JavaScriptCore/Configurations/Base.xcconfig"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "ios-11", "ios-simulator-11"]),
+        (["Source/JavaScriptCore/JavaScriptCore.xcodeproj/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "ios-11", "ios-simulator-11"]),
+        (["Source/JavaScriptCore/Configurations/Base.xcconfig"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "ios-11", "ios-simulator-11"]),
         (["Source/JavaScriptCore/JavaScriptCore.vcproj/foo", "Source/WebKit/win/WebKit2.vcproj", "Source/WebKitLegacy/win/WebKit.sln", "Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCommon.vsprops"], ["win"]),
         (["LayoutTests/platform/mac/foo", "Source/WebCore/bar"], ["*"]),
         (["LayoutTests/foo"], ["*"]),
@@ -39,29 +39,30 @@ class ShouldBuildTest(unittest.TestCase):
         (["LayoutTests/platform/mac-elcapitan/foo"], ["mac-yosemite", "mac-elcapitan"]),
         (["LayoutTests/platform/mac-sierra/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra"]),
         (["LayoutTests/platform/mac-highsierra/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra"]),
+        (["LayoutTests/platform/mac-mojave/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave"]),
         (["LayoutTests/platform/ios-simulator/foo"], ["ios-11", "ios-simulator-11"]),
         (["LayoutTests/platform/ios-simulator-wk1/foo"], ["ios-11", "ios-simulator-11"]),
         (["LayoutTests/platform/ios-simulator-wk2/foo"], ["ios-11", "ios-simulator-11"]),
-        (["LayoutTests/platform/wk2/Skipped"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "ios-11", "ios-simulator-11"]),
-        (["LayoutTests/platform/mac-wk2/Skipped"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra"]),
-        (["LayoutTests/platform/mac-wk1/compositing/tiling/transform-origin-tiled-expected.txt"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra"]),
-        (["LayoutTests/platform/mac/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "win"]),
-        (["LayoutTests/platform/mac-wk2/platform/mac/editing/spelling/autocorrection-contraction-expected.txt"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra"]),
+        (["LayoutTests/platform/wk2/Skipped"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "ios-11", "ios-simulator-11"]),
+        (["LayoutTests/platform/mac-wk2/Skipped"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave"]),
+        (["LayoutTests/platform/mac-wk1/compositing/tiling/transform-origin-tiled-expected.txt"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave"]),
+        (["LayoutTests/platform/mac/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "win"]),
+        (["LayoutTests/platform/mac-wk2/platform/mac/editing/spelling/autocorrection-contraction-expected.txt"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave"]),
         (["LayoutTests/platform/win-xp/foo"], ["win"]),
         (["LayoutTests/platform/win-wk1/foo"], ["win"]),
         (["LayoutTests/platform/win/foo"], ["win"]),
-        (["LayoutTests/platform/spi/cocoa/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "ios-11", "ios-simulator-11"]),
-        (["LayoutTests/platform/spi/cf/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "win", "ios-11", "ios-simulator-11"]),
-        (["Source/WebKitLegacy/mac/WebKit.mac.exp"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra"]),
+        (["LayoutTests/platform/spi/cocoa/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "ios-11", "ios-simulator-11"]),
+        (["LayoutTests/platform/spi/cf/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "win", "ios-11", "ios-simulator-11"]),
+        (["Source/WebKitLegacy/mac/WebKit.mac.exp"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave"]),
         (["Source/WebKitLegacy/ios/WebKit.iOS.exp"], ["ios-11", "ios-simulator-11"]),
-        (["Source/Dummy/foo.exp"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "ios-11", "ios-simulator-11"]),
+        (["Source/Dummy/foo.exp"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "ios-11", "ios-simulator-11"]),
         (["Source/WebCore/ios/foo"], ["ios-11", "ios-simulator-11"]),
-        (["Source/WebCore/mac/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra"]),
+        (["Source/WebCore/mac/foo"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave"]),
         (["Source/WebCore/win/foo"], ["win"]),
-        (["Source/WebCore/bridge/objc/objc_class.mm"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "ios-11", "ios-simulator-11"]),
+        (["Source/WebCore/bridge/objc/objc_class.mm"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "ios-11", "ios-simulator-11"]),
         (["Source/WebCore/platform/wx/wxcode/win/foo"], []),
         (["Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm"], ["ios-11", "ios-simulator-11"]),
-        (["Source/WebCore/rendering/RenderThemeMac.mm", "Source/WebCore/rendering/RenderThemeMac.h"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra"]),
+        (["Source/WebCore/rendering/RenderThemeMac.mm", "Source/WebCore/rendering/RenderThemeMac.h"], ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave"]),
         (["Source/WebCore/rendering/RenderThemeIOS.mm", "Source/WebCore/rendering/RenderThemeIOS.h"], ["ios-11", "ios-simulator-11"]),
         (["Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js"], []),
     ]
@@ -70,7 +71,7 @@ class ShouldBuildTest(unittest.TestCase):
         for files, platforms in self._should_build_tests:
             # FIXME: We should test more platforms here once
             # wkbuild._should_file_trigger_build is implemented for them.
-            for platform in ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "win", "ios-11", "ios-simulator-11"]:
+            for platform in ["mac-yosemite", "mac-elcapitan", "mac-sierra", "mac-highsierra", "mac-mojave", "win", "ios-11", "ios-simulator-11"]:
                 should_build = platform in platforms or "*" in platforms
                 self.assertEqual(wkbuild.should_build(platform, files), should_build, "%s should%s have built but did%s (files: %s)" % (platform, "" if should_build else "n't", "n't" if should_build else "", str(files)))
 
index f4503b7..2fc4f37 100644 (file)
@@ -1,3 +1,33 @@
+2018-06-04  Alexey Proskuryakov  <ap@apple.com>
+
+        Add Mojave support to WebKit tools
+        https://bugs.webkit.org/show_bug.cgi?id=186282
+
+        Reviewed by Daniel Bates.
+
+        Nightly build support will be added separately.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave.png: Added.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave@2x.png: Added.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
+        Added dashboard support.
+
+        * BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
+        * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
+        Trigger the right build queues on check-in.
+
+        * Scripts/webkitpy/common/version_name_map.py:
+        * Scripts/webkitpy/common/version_name_map_unittest.py:
+        The main version mapping class updated.
+
+        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+        * Scripts/webkitpy/port/mac_unittest.py:
+        Updated for more platforms in unit tests.
+
+        * TestResultServer/static-dashboards/flakiness_dashboard.js:
+        Added the new platform to flakiness dashboard.
+
 2018-06-04  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [WebKit on watchOS] Remove all uses of the EXTRA_ZOOM_MODE compiler flag
index 6caed38..aea2e21 100644 (file)
@@ -59,6 +59,7 @@ class VersionNameMap(object):
                 'El Capitan': Version(10, 11),
                 'Sierra': Version(10, 12),
                 'High Sierra': Version(10, 13),
+                'Mojave': Version(10, 14),
             },
             'ios': self._automap_to_major_version('iOS', minimum=Version(10), maximum=Version(11)),
             'tvos': self._automap_to_major_version('tvOS', minimum=Version(10), maximum=Version(11)),
index 286eb59..cf34f2c 100644 (file)
@@ -36,6 +36,11 @@ class VersionMapTestCase(unittest.TestCase):
 
     def test_mac_version_by_name(self):
         map = VersionNameMap()
+        self.assertEqual(('mac', Version(10, 14)), map.from_name('Mojave'))
+        self.assertEqual(('mac', Version(10, 14)), map.from_name('mojave'))
+        self.assertEqual(('mac', Version(10, 13)), map.from_name('High Sierra'))
+        self.assertEqual(('mac', Version(10, 13)), map.from_name('high sierra'))
+        self.assertEqual(('mac', Version(10, 13)), map.from_name('highsierra'))
         self.assertEqual(('mac', Version(10, 12)), map.from_name('Sierra'))
         self.assertEqual(('mac', Version(10, 12)), map.from_name('sierra'))
         self.assertEqual(('mac', Version(10, 11)), map.from_name('El Capitan'))
@@ -52,6 +57,9 @@ class VersionMapTestCase(unittest.TestCase):
 
     def test_mac_name_by_version(self):
         map = VersionNameMap()
+        self.assertEqual('Mojave', map.to_name(version=Version(10, 14), platform='mac'))
+        self.assertEqual('High Sierra', map.to_name(version=Version(10, 13), platform='mac'))
+        self.assertEqual('High Sierra', map.to_name(version=Version(10, 13, 3), platform='mac'))
         self.assertEqual('Sierra', map.to_name(version=Version(10, 12), platform='mac'))
         self.assertEqual('El Capitan', map.to_name(version=Version(10, 11), platform='mac'))
         self.assertEqual('El Capitan', map.to_name(version=Version(10, 11, 3), platform='mac'))
index e89b2fa..aa5b511 100644 (file)
@@ -228,7 +228,7 @@ class TestExpectationParser(object):
 
     # FIXME: Update the original modifiers and remove this once the old syntax is gone.
     _configuration_tokens_list = [
-        'Mac', 'SnowLeopard', 'Lion', 'MountainLion', 'Mavericks', 'Yosemite', 'ElCapitan', 'Sierra', 'HighSierra',
+        'Mac', 'SnowLeopard', 'Lion', 'MountainLion', 'Mavericks', 'Yosemite', 'ElCapitan', 'Sierra', 'HighSierra', 'Mojave',
         'Win', 'XP', 'Vista', 'Win7',
         'Linux',
         'Android',
index 0e66ac8..8908df8 100644 (file)
@@ -74,6 +74,9 @@ class MacTest(darwin_testcase.DarwinTest):
         self.assert_name('mac', 'highsierra', 'mac-highsierra')
         self.assert_name('mac-highsierra', 'elcapitan', 'mac-highsierra')
         self.assert_name('mac-highsierra', 'sierra', 'mac-highsierra')
+        self.assert_name('mac', 'mojave', 'mac-mojave')
+        self.assert_name('mac-mojave', 'sierra', 'mac-mojave')
+        self.assert_name('mac-mojave', 'highsierra', 'mac-mojave')
         self.assertRaises(AssertionError, self.assert_name, 'mac-tiger', 'leopard', 'mac-leopard')
 
     def test_setup_environ_for_server(self):
index f25192b..a9c8b11 100644 (file)
@@ -61,6 +61,12 @@ var PLATFORMS = {
                             'WK2': { fallbackPlatforms: ['APPLE_MAC_HIGHSIERRA', 'APPLE_MAC', 'WK2'], expectationsDirectory: 'mac-wk2'}
                         }
                     },
+                    'MOJAVE': {
+                        subPlatforms: {
+                            'WK1': { fallbackPlatforms: ['APPLE_MAC_MOJAVE', 'APPLE_MAC'] },
+                            'WK2': { fallbackPlatforms: ['APPLE_MAC_MOJAVE', 'APPLE_MAC', 'WK2'], expectationsDirectory: 'mac-wk2'}
+                        }
+                    },
                 }
             },
             'WIN': {
@@ -350,6 +356,8 @@ function determineBuilderPlatform(builderNameUpperCase)
     if (string.contains(builderNameUpperCase, 'WPE LINUX'))
         return 'WPE_LINUX';
 
+    if (string.contains(builderNameUpperCase, 'MOJAVE'))
+        return determineWKPlatform(builderNameUpperCase, 'APPLE_MAC_MOJAVE');
     if (string.contains(builderNameUpperCase, 'HIGHSIERRA'))
         return determineWKPlatform(builderNameUpperCase, 'APPLE_MAC_HIGHSIERRA');
     if (string.contains(builderNameUpperCase, 'SIERRA'))
@@ -700,6 +708,7 @@ function getParsedExpectations(data)
             'ElCapitan': 'ELCAPITAN',
             'Sierra': 'SIERRA',
             'HighSierra': 'HIGHSIERRA',
+            'Mojave': 'MOJAVE',
             'Win7': 'WIN7',
             'XP': 'XP',
             'Vista': 'VISTA',