Changeset 64959 in webkit
- Timestamp:
- Aug 8, 2010 6:26:16 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/BuildSlaveSupport/test-result-archive
r64709 r64959 24 24 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 25 26 import optparse, os, shutil, subprocess, sys 26 import optparse, os, shutil, subprocess, sys, zipfile 27 27 28 28 sourceRootDirectory = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) … … 73 73 if subprocess.call(["ditto", "-c", "-k", "--sequesterRsrc", layoutTestResultsDir, archiveFile]): 74 74 return 1 75 elif platform in ('win', 'gtk', 'qt' , 'chromium'):75 elif platform in ('win', 'gtk', 'qt'): 76 76 if subprocess.call(["zip", "-r", archiveFile, "."], cwd=layoutTestResultsDir): 77 77 return 1 78 elif platform == 'chromium': 79 os.chdir(layoutTestResultsDir) 80 zipFilesRecursively(archiveFile, ["."]) 78 81 79 82 try: … … 89 92 raise 90 93 94 def zipFilesRecursively(archiveFile, files): 95 """Make a zip archive. 96 97 Args: 98 archiveFile: The resultant zip archive file name. 99 files: A list of files to be archived. If a list item is a directory, 100 files in the directory are archived recursively.""" 101 zipper = zipfile.ZipFile(archiveFile, 'w', zipfile.ZIP_DEFLATED) 102 for file in files: 103 if os.path.isdir(file): 104 for dirPath, dirNames, fileNames in os.walk(file): 105 for fileName in fileNames: 106 relativePath = os.path.join(dirPath, fileName) 107 print "Adding", relativePath 108 zipper.write(relativePath) 109 else: 110 print "Adding", file 111 zipper.write(file) 112 zipper.close() 113 print "Created zip archive: ", archiveFile 114 91 115 if __name__ == '__main__': 92 116 sys.exit(main()) -
trunk/WebKitTools/ChangeLog
r64948 r64959 1 2010-08-08 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 Chromium buildbot: Avoid "zip" command dependency 6 https://bugs.webkit.org/show_bug.cgi?id=43470 7 8 * BuildSlaveSupport/test-result-archive: 9 For Chromium port, creates a zip archive with zipfile package of Python 10 instead of external "zip" command. We'd like to avoid additional 11 command installation. 12 1 13 2010-08-08 Jon Honeycutt <jhoneycutt@apple.com> 2 14
Note: See TracChangeset
for help on using the changeset viewer.