haikuwebkit/Tools/CISupport/download-built-product

63 lines
2.6 KiB
Plaintext
Raw Permalink Normal View History

Replace hard-coded paths in shebangs with #!/usr/bin/env https://bugs.webkit.org/show_bug.cgi?id=181040 Patch by Ting-Wei Lan <lantw44@gmail.com> on 2018-01-03 Reviewed by Alex Christensen. .: * Source/cmake/tools/scripts/auto-version.pl: * Source/cmake/tools/scripts/feature-defines.pl: * Source/cmake/tools/scripts/version-stamp.pl: Source/JavaScriptCore: * Scripts/UpdateContents.py: * Scripts/cssmin.py: * Scripts/generate-combined-inspector-json.py: * Scripts/xxd.pl: * create_hash_table: * generate-bytecode-files: * wasm/generateWasm.py: * wasm/generateWasmOpsHeader.py: * yarr/generateYarrCanonicalizeUnicode: Source/WebCore: * bindings/scripts/InFilesCompiler.pm: * bindings/scripts/InFilesParser.pm: * bindings/scripts/generate-bindings-all.pl: * bindings/scripts/generate-bindings.pl: * bindings/scripts/preprocess-idls.pl: * css/make-css-file-arrays.pl: * css/makeprop.pl: * css/makevalues.pl: * dom/make_event_factory.pl: * dom/make_names.pl: * extract-localizable-strings.pl: * make-hash-tools.pl: Source/WebCore/PAL: * AVFoundationSupport.py: Source/WebInspectorUI: * Scripts/combine-resources.pl: * Scripts/copy-user-interface-resources-dryrun.rb: * Scripts/copy-user-interface-resources.pl: * Scripts/fix-worker-imports-for-optimized-builds.pl: * Scripts/remove-console-asserts-dryrun.rb: * Scripts/remove-console-asserts.pl: * Scripts/update-LegacyInspectorBackendCommands.rb: * Scripts/update-codemirror-resources.rb: * WebInspectorUI.vcxproj/build-webinspectorui.pl: Source/WebKit: * Scripts/generate-forwarding-headers.pl: Source/WebKitLegacy: * scripts/generate-webkitversion.pl: Tools: * BuildSlaveSupport/build-launcher-app: * BuildSlaveSupport/build-launcher-dmg: * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: * BuildSlaveSupport/built-product-archive: * BuildSlaveSupport/clean-build: * BuildSlaveSupport/delete-stale-build-files: * BuildSlaveSupport/download-built-product: * BuildSlaveSupport/gtk/buildbot/log/run: * BuildSlaveSupport/gtk/buildbot/run: * BuildSlaveSupport/gtk/pulseaudio/run: * BuildSlaveSupport/kill-old-processes: * BuildSlaveSupport/test-result-archive: * BuildSlaveSupport/win/kill-old-processes: * Scripts/SpacingHeuristics.pm: * Scripts/add-include: * Scripts/build-api-tests: * Scripts/build-dumprendertree: * Scripts/build-imagediff: * Scripts/build-jsc: * Scripts/build-webkit: * Scripts/build-webkittestrunner: * Scripts/check-Xcode-source-file-types: * Scripts/check-dom-results: * Scripts/check-for-exit-time-destructors: * Scripts/check-for-global-initializers: * Scripts/check-for-inappropriate-objc-class-names: * Scripts/check-for-weak-vtables-and-externals: * Scripts/clean-header-guards: * Scripts/compare-timing-files: * Scripts/configure-xcode-for-ios-development: * Scripts/copy-webkitlibraries-to-product-directory: * Scripts/create-exports: * Scripts/debug-minibrowser: * Scripts/debug-safari: * Scripts/debug-test-runner: * Scripts/do-file-rename: * Scripts/do-webcore-rename: * Scripts/dump-webkit-tests-run: * Scripts/ensure-valid-python: * Scripts/execAppWithEnv: * Scripts/extract-localizable-js-strings: * Scripts/filter-build-webkit: * Scripts/find-extra-includes: * Scripts/fix-blink-patch: * Scripts/generate-coverage-data: * Scripts/git-add-reviewer: * Scripts/jsc-stress-test-helpers/js-exception-fuzz: * Scripts/jsc-stress-test-helpers/js-executable-allocation-fuzz: * Scripts/jsc-stress-test-helpers/js-osr-exit-fuzz: * Scripts/make-new-script-test: * Scripts/make-script-test-wrappers: * Scripts/package-root: * Scripts/parse-malloc-history: * Scripts/report-include-statistics: * Scripts/resolve-ChangeLogs: * Scripts/run-api-tests: * Scripts/run-bindings-tests: * Scripts/run-content-extension-tester: * Scripts/run-iexploder-tests: * Scripts/run-javascriptcore-tests: * Scripts/run-jsc: * Scripts/run-leaks: * Scripts/run-mangleme-tests: * Scripts/run-minibrowser: * Scripts/run-pageloadtest: * Scripts/run-regexp-tests: * Scripts/run-safari: * Scripts/run-sunspider: * Scripts/run-test-runner: * Scripts/run-webkit-app: * Scripts/run-webkit-httpd: * Scripts/run-webkit-websocketserver: * Scripts/set-webkit-configuration: * Scripts/show-pretty-diff: * Scripts/sort-Xcode-project-file: * Scripts/split-file-by-class: * Scripts/sunspider-compare-results: * Scripts/svn-apply: * Scripts/svn-unapply: * Scripts/test-webkit-scripts: * Scripts/test-webkitperl: * Scripts/update-iexploder-cssproperties: * Scripts/update-javascriptcore-test-results: * Scripts/update-webkit: * Scripts/update-webkit-auxiliary-libs: * Scripts/update-webkit-dependency: * Scripts/update-webkit-libs-jhbuild: * Scripts/update-webkit-localizable-strings: * Scripts/update-webkit-support-libs: * Scripts/update-webkitgtk-libs: * Scripts/update-webkitwpe-libs: * Scripts/webkit-build-directory: * Scripts/webkitperl/LoadAsModule.pm: * Scripts/webkitperl/VCSUtils_unittest/decodeGitBinaryPatch.pl: * Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl: * Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl: * Scripts/webkitperl/VCSUtils_unittest/fixSVNPatchForAdditionWithHistory.pl: * Scripts/webkitperl/VCSUtils_unittest/generatePatchCommand.pl: * Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl: * Scripts/webkitperl/VCSUtils_unittest/parseChunkRange.pl: * Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl: * Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl: * Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl: * Scripts/webkitperl/VCSUtils_unittest/parseFirstEOL.pl: * Scripts/webkitperl/VCSUtils_unittest/parseGitDiffHeader.pl: * Scripts/webkitperl/VCSUtils_unittest/parsePatch.pl: * Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffFooter.pl: * Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffHeader.pl: * Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl: * Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl: * Scripts/webkitperl/VCSUtils_unittest/parseUnifiedDiffHeader.pl: * Scripts/webkitperl/VCSUtils_unittest/prepareParsedPatch.pl: * Scripts/webkitperl/VCSUtils_unittest/removeEOL.pl: * Scripts/webkitperl/VCSUtils_unittest/runCommand.pl: * Scripts/webkitperl/VCSUtils_unittest/runPatchCommand.pl: * Scripts/webkitperl/VCSUtils_unittest/setChangeLogDateAndReviewer.pl: * Scripts/webkitperl/auto-version_unittest/autoVersionTests.pl: * Scripts/webkitperl/auto-version_unittest/versionStampTests.pl: * Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/extractLineRangeBeforeAndAfterChange.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/fetchRadarURLFromBugXMLData.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/generateFunctionLists.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl: * Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl: * Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-new.pl: * Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl: * Scripts/webkitperl/webkitdirs_unittest/appendToEnvironmentVariableList.pl: * Scripts/webkitperl/webkitdirs_unittest/checkForArgumentAndRemoveFromArrayRef.pl: * Scripts/webkitperl/webkitdirs_unittest/checkForArgumentAndRemoveFromArrayRefGettingValue.pl: * Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl: * Scripts/webkitperl/webkitdirs_unittest/prependToEnvironmentVariableList.pl: * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: * ccache/ccache-clang: * ccache/ccache-clang++: * ccache/ccache-wrapper: * gtk/install-dependencies: * iExploder/iexploder-1.3.2/htdocs/iexploder.cgi: * iExploder/iexploder-1.3.2/htdocs/webserver.rb: * iExploder/iexploder-1.3.2/tools/lasthit.rb: * iExploder/iexploder-1.3.2/tools/osx_last_crash.rb: * iExploder/iexploder-1.3.2/tools/showtest.rb: * iExploder/iexploder-1.7.2/src/browser_harness.rb: * iExploder/iexploder-1.7.2/src/iexploder.cgi: * iExploder/iexploder-1.7.2/src/webserver.rb: * iExploder/iexploder-1.7.2/tools/lasthit.rb: * iExploder/iexploder-1.7.2/tools/osx_last_crash.rb: * wpe/install-dependencies: Canonical link: https://commits.webkit.org/197118@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-04 07:18:18 +00:00
#!/usr/bin/env python
Chromium testers should extract builds instead of building on their own https://bugs.webkit.org/show_bug.cgi?id=82996 Reviewed by Tony Chang. Make Chromium builders triggger Chromium testers and make testers download and extract builds from the buildbot master instead of building binaries on their own. Add download-built-product to wrap curl used in the download-built-product step since Windows does not provide "curl" natively. * BuildSlaveSupport/build.webkit.org-config/config.json: Add new triggerables for Chromium testers and make Chromium builders trigger them. Also change the type of Chromium testers from NewBuildAndTest to Test. * BuildSlaveSupport/build.webkit.org-config/master.cfg: (DownloadBuiltProduct): Call download-built-product instead of curl. * BuildSlaveSupport/built-product-archive: (createZip): Don't zip the parent configuration build directory like "release" and "debug". While Mac port needs this behavior for compatibility reasons, Chromium Mac port doesn't want this behavior. (archiveBuiltProduct): Zip the configuration build directory on Mac port. (unzipArchive): Extracted. Use ditto on Mac, unzip on linux and cygwin, and zipfile package on Windows. (extractBuiltProduct): Refactor the code to use removeDirectoryIfExists and unzipArchive. Support Chromium. * BuildSlaveSupport/download-built-product: Added to wrap curl which isn't available on Windows. Canonical link: https://commits.webkit.org/100417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-03 18:58:21 +00:00
#
# Copyright (C) 2009, 2020 Apple Inc. All rights reserved.
Chromium testers should extract builds instead of building on their own https://bugs.webkit.org/show_bug.cgi?id=82996 Reviewed by Tony Chang. Make Chromium builders triggger Chromium testers and make testers download and extract builds from the buildbot master instead of building binaries on their own. Add download-built-product to wrap curl used in the download-built-product step since Windows does not provide "curl" natively. * BuildSlaveSupport/build.webkit.org-config/config.json: Add new triggerables for Chromium testers and make Chromium builders trigger them. Also change the type of Chromium testers from NewBuildAndTest to Test. * BuildSlaveSupport/build.webkit.org-config/master.cfg: (DownloadBuiltProduct): Call download-built-product instead of curl. * BuildSlaveSupport/built-product-archive: (createZip): Don't zip the parent configuration build directory like "release" and "debug". While Mac port needs this behavior for compatibility reasons, Chromium Mac port doesn't want this behavior. (archiveBuiltProduct): Zip the configuration build directory on Mac port. (unzipArchive): Extracted. Use ditto on Mac, unzip on linux and cygwin, and zipfile package on Windows. (extractBuiltProduct): Refactor the code to use removeDirectoryIfExists and unzipArchive. Support Chromium. * BuildSlaveSupport/download-built-product: Added to wrap curl which isn't available on Windows. Canonical link: https://commits.webkit.org/100417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-03 18:58:21 +00:00
# Copyright (C) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
Chromium testers should extract builds instead of building on their own https://bugs.webkit.org/show_bug.cgi?id=82996 Reviewed by Tony Chang. Make Chromium builders triggger Chromium testers and make testers download and extract builds from the buildbot master instead of building binaries on their own. Add download-built-product to wrap curl used in the download-built-product step since Windows does not provide "curl" natively. * BuildSlaveSupport/build.webkit.org-config/config.json: Add new triggerables for Chromium testers and make Chromium builders trigger them. Also change the type of Chromium testers from NewBuildAndTest to Test. * BuildSlaveSupport/build.webkit.org-config/master.cfg: (DownloadBuiltProduct): Call download-built-product instead of curl. * BuildSlaveSupport/built-product-archive: (createZip): Don't zip the parent configuration build directory like "release" and "debug". While Mac port needs this behavior for compatibility reasons, Chromium Mac port doesn't want this behavior. (archiveBuiltProduct): Zip the configuration build directory on Mac port. (unzipArchive): Extracted. Use ditto on Mac, unzip on linux and cygwin, and zipfile package on Windows. (extractBuiltProduct): Refactor the code to use removeDirectoryIfExists and unzipArchive. Support Chromium. * BuildSlaveSupport/download-built-product: Added to wrap curl which isn't available on Windows. Canonical link: https://commits.webkit.org/100417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-03 18:58:21 +00:00
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
Chromium testers should extract builds instead of building on their own https://bugs.webkit.org/show_bug.cgi?id=82996 Reviewed by Tony Chang. Make Chromium builders triggger Chromium testers and make testers download and extract builds from the buildbot master instead of building binaries on their own. Add download-built-product to wrap curl used in the download-built-product step since Windows does not provide "curl" natively. * BuildSlaveSupport/build.webkit.org-config/config.json: Add new triggerables for Chromium testers and make Chromium builders trigger them. Also change the type of Chromium testers from NewBuildAndTest to Test. * BuildSlaveSupport/build.webkit.org-config/master.cfg: (DownloadBuiltProduct): Call download-built-product instead of curl. * BuildSlaveSupport/built-product-archive: (createZip): Don't zip the parent configuration build directory like "release" and "debug". While Mac port needs this behavior for compatibility reasons, Chromium Mac port doesn't want this behavior. (archiveBuiltProduct): Zip the configuration build directory on Mac port. (unzipArchive): Extracted. Use ditto on Mac, unzip on linux and cygwin, and zipfile package on Windows. (extractBuiltProduct): Refactor the code to use removeDirectoryIfExists and unzipArchive. Support Chromium. * BuildSlaveSupport/download-built-product: Added to wrap curl which isn't available on Windows. Canonical link: https://commits.webkit.org/100417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-03 18:58:21 +00:00
#
# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import optparse
import os
import subprocess
import sys
if sys.version_info > (3, 0):
from urllib.request import urlretrieve as urllib_urlretrieve
from urllib.parse import quote as urllib_quote
else:
from urllib import quote as urllib_quote
from urllib import urlretrieve as urllib_urlretrieve
Chromium testers should extract builds instead of building on their own https://bugs.webkit.org/show_bug.cgi?id=82996 Reviewed by Tony Chang. Make Chromium builders triggger Chromium testers and make testers download and extract builds from the buildbot master instead of building binaries on their own. Add download-built-product to wrap curl used in the download-built-product step since Windows does not provide "curl" natively. * BuildSlaveSupport/build.webkit.org-config/config.json: Add new triggerables for Chromium testers and make Chromium builders trigger them. Also change the type of Chromium testers from NewBuildAndTest to Test. * BuildSlaveSupport/build.webkit.org-config/master.cfg: (DownloadBuiltProduct): Call download-built-product instead of curl. * BuildSlaveSupport/built-product-archive: (createZip): Don't zip the parent configuration build directory like "release" and "debug". While Mac port needs this behavior for compatibility reasons, Chromium Mac port doesn't want this behavior. (archiveBuiltProduct): Zip the configuration build directory on Mac port. (unzipArchive): Extracted. Use ditto on Mac, unzip on linux and cygwin, and zipfile package on Windows. (extractBuiltProduct): Refactor the code to use removeDirectoryIfExists and unzipArchive. Support Chromium. * BuildSlaveSupport/download-built-product: Added to wrap curl which isn't available on Windows. Canonical link: https://commits.webkit.org/100417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-03 18:58:21 +00:00
def main():
parser = optparse.OptionParser("usage: %prog [options] [url]")
parser.add_option("--platform", dest="platform")
parser.add_option("--debug", action="store_const", const="debug", dest="configuration")
parser.add_option("--release", action="store_const", const="release", dest="configuration")
options, (url, ) = parser.parse_args()
archiveDir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "WebKitBuild"))
if not os.path.isdir(archiveDir):
os.makedirs(archiveDir)
archivePath = os.path.join(archiveDir, "%s.zip" % options.configuration)
if sys.platform == 'win32': # curl is not availble on Windows (outside of cygwin)
urllib_urlretrieve(url, archivePath)
Chromium testers should extract builds instead of building on their own https://bugs.webkit.org/show_bug.cgi?id=82996 Reviewed by Tony Chang. Make Chromium builders triggger Chromium testers and make testers download and extract builds from the buildbot master instead of building binaries on their own. Add download-built-product to wrap curl used in the download-built-product step since Windows does not provide "curl" natively. * BuildSlaveSupport/build.webkit.org-config/config.json: Add new triggerables for Chromium testers and make Chromium builders trigger them. Also change the type of Chromium testers from NewBuildAndTest to Test. * BuildSlaveSupport/build.webkit.org-config/master.cfg: (DownloadBuiltProduct): Call download-built-product instead of curl. * BuildSlaveSupport/built-product-archive: (createZip): Don't zip the parent configuration build directory like "release" and "debug". While Mac port needs this behavior for compatibility reasons, Chromium Mac port doesn't want this behavior. (archiveBuiltProduct): Zip the configuration build directory on Mac port. (unzipArchive): Extracted. Use ditto on Mac, unzip on linux and cygwin, and zipfile package on Windows. (extractBuiltProduct): Refactor the code to use removeDirectoryIfExists and unzipArchive. Support Chromium. * BuildSlaveSupport/download-built-product: Added to wrap curl which isn't available on Windows. Canonical link: https://commits.webkit.org/100417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-03 18:58:21 +00:00
return 0
return subprocess.call(["curl", "--fail", "--output", archivePath, urllib_quote(url, safe=':/')])
Chromium testers should extract builds instead of building on their own https://bugs.webkit.org/show_bug.cgi?id=82996 Reviewed by Tony Chang. Make Chromium builders triggger Chromium testers and make testers download and extract builds from the buildbot master instead of building binaries on their own. Add download-built-product to wrap curl used in the download-built-product step since Windows does not provide "curl" natively. * BuildSlaveSupport/build.webkit.org-config/config.json: Add new triggerables for Chromium testers and make Chromium builders trigger them. Also change the type of Chromium testers from NewBuildAndTest to Test. * BuildSlaveSupport/build.webkit.org-config/master.cfg: (DownloadBuiltProduct): Call download-built-product instead of curl. * BuildSlaveSupport/built-product-archive: (createZip): Don't zip the parent configuration build directory like "release" and "debug". While Mac port needs this behavior for compatibility reasons, Chromium Mac port doesn't want this behavior. (archiveBuiltProduct): Zip the configuration build directory on Mac port. (unzipArchive): Extracted. Use ditto on Mac, unzip on linux and cygwin, and zipfile package on Windows. (extractBuiltProduct): Refactor the code to use removeDirectoryIfExists and unzipArchive. Support Chromium. * BuildSlaveSupport/download-built-product: Added to wrap curl which isn't available on Windows. Canonical link: https://commits.webkit.org/100417@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-03 18:58:21 +00:00
if __name__ == '__main__':
sys.exit(main())