WebKit Bugzilla
Attachment 343173 Details for
Bug 186857
: [WinCairo][Buildbot] Test bots should use same WinCairoRequirements version as the triggering build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.diff (text/plain), 7.77 KB, created by
Ross Kirsling
on 2018-06-20 12:01:32 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ross Kirsling
Created:
2018-06-20 12:01:32 PDT
Size:
7.77 KB
patch
obsolete
>diff --git a/Tools/BuildSlaveSupport/built-product-archive b/Tools/BuildSlaveSupport/built-product-archive >index 68fe4ba5521..9416e56f73e 100644 >--- a/Tools/BuildSlaveSupport/built-product-archive >+++ b/Tools/BuildSlaveSupport/built-product-archive >@@ -220,6 +220,13 @@ def archiveBuiltProduct(configuration, platform, fullPlatform, minify=False): > > removeDirectoryIfExists(thinDirectory) > copyBuildFiles(binDirectory, thinBinDirectory, ['*.ilk']) >+ >+ # Save WinCairoRequirements version for test bot use >+ if platform == 'wincairo': >+ shutil.copy( >+ os.path.join(os.getenv('WEBKIT_LIBRARIES'), 'WinCairoRequirements.zip.version'), >+ os.path.join(thinDirectory, 'WinCairoRequirements.zip.config')) >+ > if createZip(thinDirectory, configuration): > return 1 > >@@ -270,7 +277,12 @@ def extractBuiltProduct(configuration, platform): > return unzipArchive(_topLevelBuildDirectory, configuration) > elif platform in ('win', 'gtk', 'wpe', 'wincairo'): > print 'Extracting', _configurationBuildDirectory >- return unzipArchive(_configurationBuildDirectory, configuration) >+ if unzipArchive(_configurationBuildDirectory, configuration) >+ return 1 >+ >+ # Restore WinCairoRequirements version for test bot use >+ if platform == 'wincairo': >+ shutil.move(os.path.join(_configurationBuildDirectory, 'WinCairoRequirements.zip.config'), os.getenv('WEBKIT_LIBRARIES')) > > > if __name__ == '__main__': >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 4e46d5b8002..d0e994a58fb 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,24 @@ >+2018-06-20 Ross Kirsling <ross.kirsling@sony.com> >+ >+ [WinCairo][Buildbot] Test bots should use same WinCairoRequirements version as the triggering build >+ https://bugs.webkit.org/show_bug.cgi?id=186857 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/built-product-archive: >+ (archiveBuiltProduct): >+ (extractBuiltProduct): >+ Save and restore the WinCairoRequirements version using the build archive. >+ >+ * Scripts/download-github-release.py: Renamed from Tools/Scripts/download-latest-github-release.py. >+ Generalize download script -- get the latest version by default, but allow an arbitrary version to be specified. >+ >+ * Scripts/update-vswhere.py: >+ Consume renamed script. >+ >+ * Scripts/update-webkit-wincairo-libs.py: >+ Consume renamed script and specify a version to download when a config file is present. >+ > 2018-06-20 Robin Morisset <rmorisset@apple.com> > > [WSL] Add details to the sphinx outline >diff --git a/Tools/Scripts/download-latest-github-release.py b/Tools/Scripts/download-github-release.py >similarity index 82% >rename from Tools/Scripts/download-latest-github-release.py >rename to Tools/Scripts/download-github-release.py >index ac9b4793afa..91ab8f81bde 100755 >--- a/Tools/Scripts/download-latest-github-release.py >+++ b/Tools/Scripts/download-github-release.py >@@ -31,12 +31,13 @@ import urllib2 > > PUBLIC_GITHUB_API_ENDPOINT = 'https://api.github.com/' > >-DESCRIPTION = '''Downloads the latest release binary from a GitHub repository. >+DESCRIPTION = '''Downloads a release binary from a GitHub repository. >+(Requests the latest release unless a specific tag is provided.) > > Intended for download of vswhere.exe and WinCairoRequirements.zip, > but may be used for arbitrary binaries / repositories. > >-Checks whether the latest version already exists in the output directory >+Checks whether the desired version already exists in the output directory > (by looking for a .version file saved alongside the release binary) -- > if so, download is skipped; otherwise any existing version is overwritten. > ''' >@@ -56,11 +57,13 @@ def parse_args(argv): > parser.add_argument('-o', '--output-dir', default='.', help='output directory (defaults to working directory)') > parser.add_argument('-e', '--endpoint', default=PUBLIC_GITHUB_API_ENDPOINT, help='GitHub API endpoint (defaults to api.github.com)') > parser.add_argument('-t', '--token', default=None, help='GitHub API OAuth token (for private repos/endpoints)') >+ parser.add_argument('-r', '--release-tag', default=None, help='release tag to download (defaults to latest)') > return parser.parse_args(argv) > > >-def find_latest_release(endpoint, repo, filename, token): >- url = '{}/repos/{}/releases/latest'.format(endpoint.rstrip('/'), repo) >+def find_release(endpoint, repo, filename, token, tag): >+ release_name = 'tags/{}'.format(tag) if tag else 'latest' >+ url = '{}/repos/{}/releases/{}'.format(endpoint.rstrip('/'), repo, release_name) > > request = urllib2.Request(url) > request.add_header('Accept', 'application/vnd.github.v3+json') >@@ -118,10 +121,11 @@ def main(argv): > else: > print('No existing release found.') > >- print('Seeking latest release from {}...'.format(args.repo)) >- release_url, latest_version_info = find_latest_release(args.endpoint, args.repo, args.filename, args.token) >+ release_title = 'release "{}"'.format(args.release_tag) if args.release_tag else 'latest release' >+ print('Seeking {} from {}...'.format(release_title, args.repo)) >+ release_url, target_version_info = find_release(args.endpoint, args.repo, args.filename, args.token, args.release_tag) > >- if not latest_version_info: >+ if not target_version_info: > if existing_version_info: > print('Falling back to existing release!') > return Status.USING_EXISTING >@@ -129,9 +133,9 @@ def main(argv): > print('No release found!') > return Status.COULD_NOT_FIND > >- print('Found latest release: {}'.format(latest_version_info['tag_name'])) >+ print('Found release to download: {}'.format(target_version_info['tag_name'])) > >- if latest_version_info == existing_version_info: >+ if target_version_info == existing_version_info: > print('Already up-to-date!') > return Status.UP_TO_DATE > >@@ -140,7 +144,7 @@ def main(argv): > > print('Downloading to {}...'.format(os.path.abspath(args.output_dir))) > download_release(release_url, binary_path, args.token) >- save_version_info(version_info_path, latest_version_info) >+ save_version_info(version_info_path, target_version_info) > print('Done!') > > return Status.DOWNLOADED >diff --git a/Tools/Scripts/update-vswhere.py b/Tools/Scripts/update-vswhere.py >index a1dcbfc019a..b2360f4466f 100644 >--- a/Tools/Scripts/update-vswhere.py >+++ b/Tools/Scripts/update-vswhere.py >@@ -28,7 +28,7 @@ import sys > import os > import stat > >-download = importlib.import_module('download-latest-github-release') >+download = importlib.import_module('download-github-release') > > repo = 'Microsoft/vswhere' > file = 'vswhere.exe' >diff --git a/Tools/Scripts/update-webkit-wincairo-libs.py b/Tools/Scripts/update-webkit-wincairo-libs.py >index ba3fd72acc0..411c931ad60 100644 >--- a/Tools/Scripts/update-webkit-wincairo-libs.py >+++ b/Tools/Scripts/update-webkit-wincairo-libs.py >@@ -24,17 +24,25 @@ > # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > import importlib >+import json > import os.path > import sys > import zipfile > >-download = importlib.import_module('download-latest-github-release') >+download = importlib.import_module('download-github-release') > > repo = 'WebKitForWindows/WinCairoRequirements' > file = 'WinCairoRequirements.zip' > output = 'WebKitLibraries/win' >+options = [repo, file, '-o', output] > >-result = download.main(['-o', output, repo, file]) >+# Check if there's a specific version to request >+config_path = os.path.join(output, file) + '.config' >+if os.path.exists(config_path): >+ with open(config_path) as config_file: >+ options += ['-r', json.load(config_file)['tag_name']] >+ >+result = download.main(options) > > # Only unzip if required > if result == download.Status.DOWNLOADED:
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 186857
: 343173