[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
tkent at chromium.org
tkent at chromium.org
Wed Dec 22 11:49:44 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 0968ef2d95ad83372b9ed03c0c4e4d7bf9a0cb78
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 9 01:26:16 2010 +0000
Chromium buildbot: Avoid "zip" command dependency
https://bugs.webkit.org/show_bug.cgi?id=43470
Reviewed by Tony Chang.
* BuildSlaveSupport/test-result-archive:
For Chromium port, creates a zip archive with zipfile package of Python
instead of external "zip" command. We'd like to avoid additional
command installation.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/BuildSlaveSupport/test-result-archive b/WebKitTools/BuildSlaveSupport/test-result-archive
index 9a0acfe..ae97991 100644
--- a/WebKitTools/BuildSlaveSupport/test-result-archive
+++ b/WebKitTools/BuildSlaveSupport/test-result-archive
@@ -23,7 +23,7 @@
# (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, os, shutil, subprocess, sys
+import optparse, os, shutil, subprocess, sys, zipfile
sourceRootDirectory = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
archiveFile = os.path.join(sourceRootDirectory, "layout-test-results.zip")
@@ -72,9 +72,12 @@ def archiveTestResults(configuration, platform, layoutTestResultsDir):
if platform == 'mac':
if subprocess.call(["ditto", "-c", "-k", "--sequesterRsrc", layoutTestResultsDir, archiveFile]):
return 1
- elif platform in ('win', 'gtk', 'qt', 'chromium'):
+ elif platform in ('win', 'gtk', 'qt'):
if subprocess.call(["zip", "-r", archiveFile, "."], cwd=layoutTestResultsDir):
return 1
+ elif platform == 'chromium':
+ os.chdir(layoutTestResultsDir)
+ zipFilesRecursively(archiveFile, ["."])
try:
shutil.rmtree(layoutTestResultsDir)
@@ -88,5 +91,26 @@ def archiveTestResults(configuration, platform, layoutTestResultsDir):
if e.errno != 90:
raise
+def zipFilesRecursively(archiveFile, files):
+ """Make a zip archive.
+
+ Args:
+ archiveFile: The resultant zip archive file name.
+ files: A list of files to be archived. If a list item is a directory,
+ files in the directory are archived recursively."""
+ zipper = zipfile.ZipFile(archiveFile, 'w', zipfile.ZIP_DEFLATED)
+ for file in files:
+ if os.path.isdir(file):
+ for dirPath, dirNames, fileNames in os.walk(file):
+ for fileName in fileNames:
+ relativePath = os.path.join(dirPath, fileName)
+ print "Adding", relativePath
+ zipper.write(relativePath)
+ else:
+ print "Adding", file
+ zipper.write(file)
+ zipper.close()
+ print "Created zip archive: ", archiveFile
+
if __name__ == '__main__':
sys.exit(main())
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 2380e7e..321d400 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-08 Kent Tamura <tkent at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Chromium buildbot: Avoid "zip" command dependency
+ https://bugs.webkit.org/show_bug.cgi?id=43470
+
+ * BuildSlaveSupport/test-result-archive:
+ For Chromium port, creates a zip archive with zipfile package of Python
+ instead of external "zip" command. We'd like to avoid additional
+ command installation.
+
2010-08-08 Jon Honeycutt <jhoneycutt at apple.com>
WebKitTestRunner should add the QuickTime dir to the PATH environment
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list