Changeset 190515 in webkit
- Timestamp:
- Oct 2, 2015, 12:43:09 PM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/built-product-archive
r190439 r190515 63 63 64 64 if action == 'archive': 65 return archiveBuiltProduct(options.configuration, genericPlatform )65 return archiveBuiltProduct(options.configuration, genericPlatform, options.platform) 66 66 else: 67 67 return extractBuiltProduct(options.configuration, genericPlatform) 68 68 69 69 70 def determineWebKitBuildDirectories(platform, fullPlatform, configuration): 71 global _configurationBuildDirectory 72 global _topLevelBuildDirectory 70 def webkitBuildDirectoryForConfigurationAndPlatform(configuration, platform, fullPlatform='', returnTopLevelDirectory=False): 73 71 if fullPlatform.startswith('ios-simulator'): 74 72 platform = 'ios-simulator' … … 76 74 platform = 'device' 77 75 command = ['perl', os.path.join(os.path.dirname(__file__), '..', 'Scripts', 'webkit-build-directory'), '--' + platform, '--' + configuration] 78 _configurationBuildDirectory = subprocess.Popen(command + ['--configuration'], stdout=subprocess.PIPE).communicate()[0].strip() 79 _topLevelBuildDirectory = subprocess.Popen(command + ['--top-level'], stdout=subprocess.PIPE).communicate()[0].strip() 76 if returnTopLevelDirectory: 77 command += ['--top-level'] 78 else: 79 command += ['--configuration'] 80 return subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0].strip() 81 82 83 def determineWebKitBuildDirectories(platform, fullPlatform, configuration): 84 global _configurationBuildDirectory 85 global _topLevelBuildDirectory 86 _configurationBuildDirectory = webkitBuildDirectoryForConfigurationAndPlatform(configuration, platform, fullPlatform) 87 _topLevelBuildDirectory = webkitBuildDirectoryForConfigurationAndPlatform(configuration, platform, fullPlatform, returnTopLevelDirectory=True) 80 88 return _topLevelBuildDirectory 81 89 … … 101 109 102 110 103 def createZip(directoryToZip, configuration ):111 def createZip(directoryToZip, configuration, embedParentDirectoryNameOnDarwin=False): 104 112 archiveDir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "WebKitBuild")) 105 113 archiveFile = os.path.join(archiveDir, configuration + ".zip") … … 112 120 113 121 if sys.platform == 'darwin': 114 return subprocess.call(["ditto", "-c", "-k", "--keepParent", "--sequesterRsrc", directoryToZip, archiveFile]) 122 command = ['ditto', '-c', '-k', '--sequesterRsrc'] 123 if embedParentDirectoryNameOnDarwin: 124 command += ['--keepParent'] 125 command += [directoryToZip, archiveFile] 126 return subprocess.call(command) 115 127 elif sys.platform == 'cygwin': 116 128 return subprocess.call(["zip", "-r", archiveFile, "bin32"], cwd=directoryToZip) … … 122 134 123 135 124 def archiveBuiltProduct(configuration, platform ):136 def archiveBuiltProduct(configuration, platform, fullPlatform): 125 137 assert platform in ('mac', 'win', 'gtk', 'efl', 'ios') 126 138 127 if platform in ('mac', 'ios'): 128 return createZip(_configurationBuildDirectory, configuration) 139 if fullPlatform.startswith('ios-simulator'): 140 # We need to include in the archive the Mac tool, LayoutTestRelay, to run layout tests in the iOS simulator. 141 combinedDirectory = os.path.join(_topLevelBuildDirectory, 'combined-mac-and-ios') 142 removeDirectoryIfExists(combinedDirectory) 143 os.makedirs(combinedDirectory) 144 145 if subprocess.call(['/bin/cp', '-pR', _configurationBuildDirectory, combinedDirectory]): 146 return 1 147 148 macBuildDirectory = webkitBuildDirectoryForConfigurationAndPlatform(configuration, 'mac') 149 destinationDirectory = os.path.join(combinedDirectory, os.path.relpath(macBuildDirectory, _topLevelBuildDirectory)) 150 os.makedirs(destinationDirectory) 151 for filename in ['LayoutTestRelay', 'LayoutTestRelay.dSYM']: 152 sourceFile = os.path.join(macBuildDirectory, filename) 153 if not os.path.exists(sourceFile): 154 continue 155 if subprocess.call(['/bin/cp', '-pR', sourceFile, destinationDirectory]): 156 return 1 157 158 if createZip(combinedDirectory, configuration): 159 return 1 160 shutil.rmtree(combinedDirectory) 161 elif platform in ('mac', 'ios'): 162 return createZip(_configurationBuildDirectory, configuration, embedParentDirectoryNameOnDarwin=True) 129 163 elif platform == 'win': 130 164 # FIXME: We shouldn't hardcode the assumption of a 32-bit build. See <https://bugs.webkit.org/show_bug.cgi?id=149715>. -
trunk/Tools/ChangeLog
r190511 r190515 1 2015-10-02 Daniel Bates <dabates@apple.com> 2 3 LayoutTestRelay is not built and archived when building for iOS Simulator 4 https://bugs.webkit.org/show_bug.cgi?id=149753 5 6 Reviewed by Alexey Proskuryakov and Andy Estes. 7 8 Towards running layout tests on the iOS Simulator test bots, we need to teach scripts build-webkit 9 and built-product-archive to build the Mac tool LayoutTestRelay and include this tool in the built 10 product archive when building for iOS Simulator, respectively. 11 12 * BuildSlaveSupport/built-product-archive: 13 (main): Pass the full platform name (options.platform) to archiveBuiltProduct() so that it can 14 differentiate between iOS device and iOS Simulator platforms. 15 (webkitBuildDirectoryForConfigurationAndPlatform): Extracted logic to run the script webkit-build-directory 16 from determineWebKitBuildDirectories() into this function so that it can be used by both 17 determineWebKitBuildDirectories() and archiveBuiltProduct(). 18 (determineWebKitBuildDirectories): Moved logic to execute the script webkit-build-directory from here to 19 webkitBuildDirectoryForConfigurationAndPlatform(). 20 (createZip): Added parameter embedParentDirectoryNameOnDarwin (defaults to False) to specify whether 21 we should call ditto(1) with --keepParent to embed the parent directory name in the zip archive. This 22 argument is only applicable when building on Darwin. We only pass embedParentDirectoryNameOnDarwin=True 23 when making an archive for a Mac or iOS device build. For iOS Simulator builds we archive two directories 24 and we do not want to keep the parent directory because it is a placeholder directory used as a workaround 25 for the limitation that ditto(1) can only accept a single directory to archive on its command line. 26 (archiveBuiltProduct): Modified to take the full platform name as an argument. Added logic for iOS. 27 For iOS device builds we use the same logic as for a Mac build and archive the configuration-specific 28 build directory. For iOS Simulator builds we archive the configuration-specific iOS build directory, 29 LayoutTestRelay and LayoutTestRelay.dSYM (if it exists) from the configuration-specific Mac build. 30 * Scripts/build-layouttestrelay: 31 - Remove unnecessary include of Perl module POSIX. 32 - Only build LayoutTestRelay when building for iOS Simulator (i.e. --ios-simulator is passed). 33 * Scripts/build-webkit: 34 - Invoke script build-layouttestrelay when building for iOS Simulator. 35 1 36 2015-10-02 Brent Fulgham <bfulgham@apple.com> 2 37 -
trunk/Tools/Scripts/build-layouttestrelay
r171800 r190515 1 1 #!/usr/bin/perl -w 2 2 3 # Copyright (C) 2014 Apple Inc. All rights reserved.3 # Copyright (C) 2014-2015 Apple Inc. All rights reserved. 4 4 # 5 5 # Redistribution and use in source and binary forms, with or without … … 30 30 use lib $FindBin::Bin; 31 31 use webkitdirs; 32 use POSIX;33 32 34 33 my $showHelp = 0; … … 58 57 chdir "Tools/LayoutTestRelay" or die; 59 58 60 if (isAppleMacWebKit()) { 61 $result = buildXCodeProject("LayoutTestRelay", $clean, XcodeOptions(), @ARGV); 62 } else { 63 die "WebKitTestRunner is not supported on this platform.\n"; 59 if (isIOSWebKit() && willUseIOSSimulatorSDKWhenBuilding()) { 60 setXcodeSDK(undef); # Force use of Mac SDK 61 exit exitStatus(buildXCodeProject("LayoutTestRelay", $clean, XcodeOptions(), @ARGV)); 64 62 } 65 63 66 exit exitStatus($result); 64 print STDERR "LayoutTestRelay is only supported for iOS Simulator.\n"; 65 exit 1; -
trunk/Tools/Scripts/build-webkit
r190419 r190515 202 202 print(join(" ", @copyLibrariesArgs) . "\n"); 203 203 (system(@copyLibrariesArgs) == 0) or die; 204 205 if (willUseIOSSimulatorSDKWhenBuilding()) { 206 (system("perl", "Tools/Scripts/build-layouttestrelay", argumentsForConfiguration()) == 0) or die; 207 } 204 208 } 205 209
Note:
See TracChangeset
for help on using the changeset viewer.