Changeset 250121 in webkit
- Timestamp:
- Sep 19, 2019 9:55:55 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r250117 r250121 1 2019-09-19 Brent Fulgham <bfulgham@apple.com> 2 3 [FTW] Enable WebKitTestRunner build 4 https://bugs.webkit.org/show_bug.cgi?id=201996 5 6 Reviewed by Fujii Hironori. 7 8 It's time to start getting the test system up and running for FTW. 9 10 This patch does the following: 11 12 1. Adds relevant CMake changes to get things building. 13 2. Adds a "--ftw" flag to the build scripts that will trigger a relevant build. 14 3. Updates 'webkitpy' to recognize the 'ftw' port. 15 16 Note: Pixel tests are not yet supported. 17 18 * PlatformFTW.cmake: Build the WK2 test runner. 19 * Scripts/build-webkit: Update to recognize the FTW port. 20 * Scripts/webkitdirs.pm: Ditto. 21 * Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl: Ditto. 22 * Scripts/webkitpy/common/config/ports.py: Ditto. 23 * Scripts/webkitpy/common/config/ports_unittest.py: Ditto. 24 * Scripts/webkitpy/common/version_name_map.py: Ditto. 25 * Scripts/webkitpy/port/factory.py: Ditto. 26 * Scripts/webkitpy/port/win.py: Ditto. 27 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 28 (WTR::InjectedBundlePage::dumpDOMAsWebArchive): Don't build or run this method 29 on Windows. 30 * WebKitTestRunner/PlatformFTW.cmake: Added. 31 * WebKitTestRunner/PlatformWebView.h: 32 * WebKitTestRunner/win/PlatformWebViewWin.cpp: 33 * WebKitTestRunner/win/TestInvocationDirect2D.cpp: Added. 34 (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Add stub implementation. 35 1 36 2019-09-19 Fujii Hironori <Hironori.Fujii@sony.com> 2 37 -
trunk/Tools/PlatformFTW.cmake
r248444 r250121 6 6 endif () 7 7 8 #if (ENABLE_WEBKIT)9 #add_subdirectory(WebKitTestRunner)10 #endif ()8 if (ENABLE_WEBKIT) 9 add_subdirectory(WebKitTestRunner) 10 endif () -
trunk/Tools/Scripts/build-webkit
r245037 r250121 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2005 , 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014Apple Inc. All rights reserved.3 # Copyright (C) 2005-2019 Apple Inc. All rights reserved. 4 4 # Copyright (C) 2009 Google Inc. All rights reserved. 5 5 # Copyright (C) 2010 moiji-mobile.com All rights reserved. … … 119 119 --[no-]xcbuild Force the use of XCBuild or not 120 120 121 --ftw Build the FTW Windows port 121 122 --gtk Build the GTK+ port 122 123 --wpe Build the WPE port … … 190 191 191 192 # Build WTF as a separate static library on ports which support it. 192 splice @projects, 0, 0, "Source/WTF" if isAppleWebKit() or isWinCairo() ;193 splice @projects, 0, 0, "Source/WTF" if isAppleWebKit() or isWinCairo() or isFTW(); 193 194 194 195 splice @projects, 0, 0, "Source/bmalloc" if isAppleCocoaWebKit(); … … 203 204 } 204 205 205 if ((isAppleWebKit() || isWinCairo() || isPlayStation() ) && !-d "WebKitLibraries") {206 if ((isAppleWebKit() || isWinCairo() || isPlayStation() || isFTW()) && !-d "WebKitLibraries") { 206 207 die "Error: No WebKitLibraries directory found. Please do a fresh checkout.\n"; 207 208 } … … 307 308 308 309 my $baseProductDir = baseProductDir(); 309 if (isAppleWinWebKit() || isWinCairo() || isPlayStation() ) {310 if (isAppleWinWebKit() || isWinCairo() || isPlayStation() || isFTW()) { 310 311 my @featureArgs = cmakeArgsFromFeatures(@features, !$noExperimentalFeatures); 311 312 removeCMakeCache(@featureArgs); … … 327 328 if (exitStatus($result)) { 328 329 my $scriptDir = relativeScriptsDir(); 329 if (isAppleWinWebKit() || isWinCairo() ) {330 if (isAppleWinWebKit() || isWinCairo() || isFTW()) { 330 331 print "\n\n===== BUILD FAILED ======\n\n"; 331 332 print "Please ensure you have run $scriptDir/update-webkit to install dependencies.\n\n"; -
trunk/Tools/Scripts/webkitdirs.pm
r248965 r250121 106 106 use constant { 107 107 AppleWin => "AppleWin", 108 FTW => "FTW", 108 109 GTK => "GTK", 109 110 iOS => "iOS", … … 495 496 push(@args, '--32-bit') if ($architecture eq "x86" and !isWin64()); 496 497 push(@args, '--64-bit') if (isWin64()); 498 push(@args, '--64-bit') if (isFTW()); 499 push(@args, '--ftw') if isFTW(); 497 500 push(@args, '--gtk') if isGtk(); 498 501 push(@args, '--wpe') if isWPE(); … … 506 509 { 507 510 my @args = (); 508 my @extract = ('--device', '--gtk', '--ios', '--platform', '--sdk', '--simulator', '--wincairo', ' SDKROOT', 'ARCHS');511 my @extract = ('--device', '--gtk', '--ios', '--platform', '--sdk', '--simulator', '--wincairo', '--ftw', 'SDKROOT', 'ARCHS'); 509 512 foreach (@{$_[0]}) { 510 513 my $line = $_; … … 713 716 # WEBKIT_OUTPUTDIR exist, use that as our configuration dir. This will 714 717 # allows us to run run-webkit-tests without using build-webkit. 715 return ($ENV{"WEBKIT_OUTPUTDIR"} && isGtk()) || isAppleWinWebKit() ;718 return ($ENV{"WEBKIT_OUTPUTDIR"} && isGtk()) || isAppleWinWebKit() || isFTW(); 716 719 } 717 720 … … 721 724 determineBaseProductDir(); 722 725 determineConfiguration(); 723 if (isAppleWinWebKit() || isWinCairo() || isPlayStation() ) {726 if (isAppleWinWebKit() || isWinCairo() || isPlayStation() || isFTW()) { 724 727 $configurationProductDir = File::Spec->catdir($baseProductDir, $configuration); 725 728 } else { … … 1047 1050 return "$configurationProductDir/$libraryName.framework/Versions/A/$libraryName"; 1048 1051 } 1049 if (isAppleWinWebKit() ) {1052 if (isAppleWinWebKit() || isFTW()) { 1050 1053 if ($libraryName eq "JavaScriptCore") { 1051 1054 return "$baseProductDir/lib/$libraryName.lib"; … … 1169 1172 1170 1173 my %argToPortName = ( 1174 ftw => FTW, 1171 1175 gtk => GTK, 1172 1176 'jsc-only' => JSCOnly, … … 1258 1262 } 1259 1263 1264 sub isFTW() 1265 { 1266 return portName() eq FTW; 1267 } 1268 1260 1269 sub isWinCairo() 1261 1270 { … … 1284 1293 { 1285 1294 return if defined($isWin64); 1286 $isWin64 = checkForArgumentAndRemoveFromARGV("--64-bit") || ((is WinCairo() || isJSCOnly()) && !shouldBuild32Bit());1295 $isWin64 = checkForArgumentAndRemoveFromARGV("--64-bit") || ((isFTW() || isWinCairo() || isJSCOnly()) && !shouldBuild32Bit()); 1287 1296 } 1288 1297 … … 1694 1703 } elsif (isAppleMacWebKit()) { 1695 1704 return "Safari"; 1696 } elsif (isAppleWinWebKit() ) {1705 } elsif (isAppleWinWebKit() || isFTW()) { 1697 1706 return "MiniBrowser"; 1698 1707 } … … 1797 1806 sub setupAppleWinEnv() 1798 1807 { 1799 return unless isAppleWinWebKit() ;1808 return unless isAppleWinWebKit() || isFTW(); 1800 1809 1801 1810 checkInstalledTools(); … … 2261 2270 2262 2271 # Some ports have production mode, but build-webkit should always use developer mode. 2263 push @args, "-DDEVELOPER_MODE=ON" if is Gtk() || isJSCOnly() || isWPE() || isWinCairo();2272 push @args, "-DDEVELOPER_MODE=ON" if isFTW() || isGtk() || isJSCOnly() || isWPE() || isWinCairo(); 2264 2273 2265 2274 if (architecture() eq "x86_64" && shouldBuild32Bit()) { … … 2428 2437 if (isAnyWindows()) { 2429 2438 my $productBinaryDir = executableProductDir(); 2430 if (isAppleWinWebKit() ) {2439 if (isAppleWinWebKit() || isFTW()) { 2431 2440 $env->{PATH} = join(':', $productBinaryDir, appleApplicationSupportPath(), $env->{PATH} || ""); 2432 2441 } elsif (isWinCairo()) { … … 2885 2894 } 2886 2895 2887 if (isAppleWinWebKit() ) {2896 if (isAppleWinWebKit() || isFTW()) { 2888 2897 my $result; 2889 2898 my $webKitLauncherPath = File::Spec->catfile(executableProductDir(), "MiniBrowser.exe"); … … 2899 2908 return runMacWebKitApp(File::Spec->catfile(productDir(), "MiniBrowser.app", "Contents", "MacOS", "MiniBrowser")); 2900 2909 } 2901 if (isAppleWinWebKit() ) {2910 if (isAppleWinWebKit() || isFTW()) { 2902 2911 my $webKitLauncherPath = File::Spec->catfile(executableProductDir(), "MiniBrowser.exe"); 2903 2912 return system { $webKitLauncherPath } $webKitLauncherPath, @ARGV; -
trunk/Tools/Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl
r226395 r250121 93 93 description => "Debug 64-bit build", 94 94 }, 95 { 96 argValue => ["--debug", "--ftw"], 97 expectedValue => ["--debug"], 98 description => "Debug with FTW", 99 }, 95 100 ); 96 101 -
trunk/Tools/Scripts/webkitpy/common/config/ports.py
r247781 r250121 1 1 # Copyright (C) 2009, Google Inc. All rights reserved. 2 2 # Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies). 3 # Copyright (C) 2015 , 2017Apple Inc. All rights reserved.3 # Copyright (C) 2015-2019 Apple Inc. All rights reserved. 4 4 # 5 5 # Redistribution and use in source and binary forms, with or without … … 64 64 def port(port_name): 65 65 ports = { 66 "ftw": FTWPort, 66 67 "gtk-wk2": GtkWK2Port, 67 68 "ios-device": IOSPort, … … 205 206 206 207 208 class FTWPort(DeprecatedPort): 209 port_flag_name = "ftw" 210 211 def build_webkit_command(self, build_style=None): 212 command = super(FTWPort, self).build_webkit_command(build_style=build_style) 213 command.append('--ftw') 214 return command 215 216 def run_webkit_tests_command(self, build_style=None): 217 command = super(FTWPort, self).run_webkit_tests_command(build_style) 218 command.append("--ftw") 219 return command 220 221 207 222 class GtkWK2Port(DeprecatedPort): 208 223 port_flag_name = "gtk-wk2" -
trunk/Tools/Scripts/webkitpy/common/config/ports_unittest.py
r247781 r250121 63 63 self.assertEqual(WinCairoPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--wincairo"]) 64 64 65 def test_ftw_port(self): 66 self.assertEqual(FTWPort().flag(), "--port=ftw") 67 self.assertEqual(FTWPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests") + ["--ftw"]) 68 self.assertEqual(FTWPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--ftw"]) 69 self.assertEqual(FTWPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--ftw"]) 70 65 71 def test_jsconly_port(self): 66 72 self.assertEqual(JscOnlyPort().flag(), "--port=jsc-only") -
trunk/Tools/Scripts/webkitpy/common/version_name_map.py
r246497 r250121 83 83 self.mapping[PUBLIC_TABLE]['wincairo'] = self.mapping[PUBLIC_TABLE]['win'] 84 84 85 # FTW uses the same versions as Windows 86 self.mapping[PUBLIC_TABLE]['ftw'] = self.mapping[PUBLIC_TABLE]['win'] 87 88 85 89 @classmethod 86 90 def _automap_to_major_version(cls, prefix, minimum=Version(1), maximum=Version(1)): -
trunk/Tools/Scripts/webkitpy/port/factory.py
r240163 r250121 1 1 # Copyright (C) 2010 Google Inc. All rights reserved. 2 # Copyright (C) 2013-201 8Apple Inc. All rights reserved.2 # Copyright (C) 2013-2019 Apple Inc. All rights reserved. 3 3 # Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies). 4 4 # … … 66 66 const=('wincairo'), 67 67 help=('Alias for --platform=wincairo')), 68 optparse.make_option('--ftw', action='store_const', dest='platform', 69 const=('ftw'), 70 help=('Alias for --platform=ftw')), 68 71 ] + (config.apple_additions().platform_options() if config.apple_additions() else []) 69 72 … … 106 109 'mock_drt.MockDRTPort', 107 110 'test.TestPort', 111 'win.FTWPort', 108 112 'win.WinCairoPort', 109 113 'win.WinPort', -
trunk/Tools/Scripts/webkitpy/port/win.py
r245733 r250121 1 1 # Copyright (C) 2010 Google Inc. All rights reserved. 2 # Copyright (C) 2013 , 2015Apple Inc. All rights reserved.2 # Copyright (C) 2013-2019 Apple Inc. All rights reserved. 3 3 # 4 4 # Redistribution and use in source and binary forms, with or without … … 495 495 496 496 return paths 497 498 499 class FTWPort(WinPort): 500 port_name = "ftw" 501 502 DEFAULT_ARCHITECTURE = 'x86_64' 503 504 def default_baseline_search_path(self, **kwargs): 505 return map(self._webkit_baseline_path, self._search_paths()) 506 507 def _port_specific_expectations_files(self, **kwargs): 508 return map(lambda x: self._filesystem.join(self._webkit_baseline_path(x), 'TestExpectations'), reversed(self._search_paths())) 509 510 def _search_paths(self): 511 paths = [] 512 version_name_map = VersionNameMap.map(self.host.platform) 513 if self._os_version < self.VERSION_MIN or self._os_version > self.VERSION_MAX: 514 versions = [self._os_version] 515 else: 516 sorted_versions = sorted(version_name_map.mapping_for_platform(platform=self.port_name).values()) 517 versions = sorted_versions[sorted_versions.index(self._os_version):] 518 519 normalize = lambda version: version.lower().replace(' ', '') 520 to_name = lambda version: version_name_map.to_name(version, platform=self.port_name) 521 522 wk_version = 'wk2' if self.get_option('webkit_test_runner') else 'wk1' 523 524 for version in versions: 525 name = self.port_name + '-' + normalize(to_name(version)) 526 paths.append(name + '-' + wk_version) 527 paths.append(name) 528 529 paths.append(self.port_name + '-' + wk_version) 530 paths.append(self.port_name) 531 if self.get_option('webkit_test_runner'): 532 paths.append('wk2') 533 paths.extend(self.get_option("additional_platform_directory", [])) 534 535 return paths -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r246034 r250121 51 51 #include <wtf/text/StringBuilder.h> 52 52 53 #if USE(CF) && !PLATFORM(WIN_CAIRO) 53 #if USE(CF) && !PLATFORM(WIN_CAIRO) && !USE(DIRECT2D) 54 54 #include "WebArchiveDumpSupport.h" 55 55 #endif … … 875 875 void InjectedBundlePage::dumpDOMAsWebArchive(WKBundleFrameRef frame, StringBuilder& stringBuilder) 876 876 { 877 #if USE(CF) && !PLATFORM(WIN_CAIRO) 877 #if USE(CF) && !PLATFORM(WIN_CAIRO) && !USE(DIRECT2D) 878 878 WKRetainPtr<WKDataRef> wkData = adoptWK(WKBundleFrameCopyWebArchive(frame)); 879 879 RetainPtr<CFDataRef> cfData = adoptCF(CFDataCreate(0, WKDataGetBytes(wkData.get()), WKDataGetSize(wkData.get()))); -
trunk/Tools/WebKitTestRunner/PlatformWebView.h
r248762 r250121 53 53 typedef WPEToolingBackends::HeadlessViewBackend* PlatformWindow; 54 54 #elif PLATFORM(WIN) 55 #if USE(DIRECT2D) 56 #include <d2d1_1.h> 57 #else 55 58 #include <cairo.h> 59 #endif 56 60 class TestRunnerWindow; 57 61 typedef HWND PlatformWindow; … … 61 65 #if USE(CAIRO) 62 66 typedef cairo_surface_t* PlatformImage; 67 #elif USE(DIRECT2D) 68 interface ID2D1Bitmap; 69 70 typedef ID2D1Bitmap* PlatformImage; 63 71 #endif 64 72 -
trunk/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
r246418 r250121 31 31 32 32 #include <WebCore/HWndDC.h> 33 #include <cairo.h>34 33 #include <cstdio> 35 34 #include <windows.h> … … 37 36 #include <wtf/win/GDIObject.h> 38 37 38 #if USE(CAIRO) 39 #include <cairo.h> 40 #endif 41 42 #if USE(DIRECT2D) 43 #include <d2d1_1.h> 44 #endif 39 45 40 46 namespace WTR {
Note: See TracChangeset
for help on using the changeset viewer.