diff options
| author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
| commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
| tree | e367e64a75991c554930278175d403c072de6bb8 /Tools/BuildSlaveSupport/test-result-archive | |
| parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
| download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz | |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Tools/BuildSlaveSupport/test-result-archive')
| -rw-r--r-- | Tools/BuildSlaveSupport/test-result-archive | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/Tools/BuildSlaveSupport/test-result-archive b/Tools/BuildSlaveSupport/test-result-archive index 4f1f75eaf..402df6574 100644 --- a/Tools/BuildSlaveSupport/test-result-archive +++ b/Tools/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, zipfile +import optparse, os, shutil, subprocess, sys sourceRootDirectory = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) archiveFile = os.path.join(sourceRootDirectory, "layout-test-results.zip") @@ -46,7 +46,7 @@ def main(): return archiveTestResults(options.configuration, options.platform, layoutTestResultsDir) def archiveTestResults(configuration, platform, layoutTestResultsDir): - assert platform in ('mac', 'win', 'wincairo', 'gtk', 'qt', 'chromium', 'efl') + assert platform in ('mac', 'win', 'wincairo', 'gtk', 'qt', 'efl') try: os.unlink(archiveFile) @@ -69,11 +69,6 @@ def archiveTestResults(configuration, platform, layoutTestResultsDir): elif platform in ('win', 'wincairo', 'gtk', 'qt', 'efl'): if subprocess.call(["zip", "-r", archiveFile, "."], cwd=layoutTestResultsDir): return 1 - elif platform == 'chromium': - cwd = os.getcwd() - os.chdir(layoutTestResultsDir) - zipFilesRecursively(archiveFile, ["."]) - os.chdir(cwd) try: shutil.rmtree(layoutTestResultsDir) @@ -91,26 +86,5 @@ def archiveTestResults(configuration, platform, layoutTestResultsDir): if e.errno != 90 and e.errno != 2: 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()) |
