Remove Chromium code from Tools/BuildSlaveSupport
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Apr 2013 06:51:20 +0000 (06:51 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Apr 2013 06:51:20 +0000 (06:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115325

Reviewed by Benjamin Poulain.

Remove the two Chromium-specific scripts and the Chromium-specific parts from the code
covering archiving test results and built products.

* BuildSlaveSupport/built-product-archive:
(archiveBuiltProduct):
(extractBuiltProduct):
* BuildSlaveSupport/chromium/output-android-device-status: Removed.
* BuildSlaveSupport/chromium/remove-crash-logs: Removed.
* BuildSlaveSupport/test-result-archive:
(archiveTestResults):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149270 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/built-product-archive
Tools/BuildSlaveSupport/chromium/output-android-device-status [deleted file]
Tools/BuildSlaveSupport/chromium/remove-crash-logs [deleted file]
Tools/BuildSlaveSupport/test-result-archive
Tools/ChangeLog

index ba74fd73774179fdc9d8970f1d89c6553b072e28..6a303086aaab5d670dcc5b053d355971c501ce94 100644 (file)
@@ -91,11 +91,6 @@ def createZipManually(directoryToZip, archiveFile):
 
 def createZip(directoryToZip, configuration, archiveConfigurationOnMac=False):
     archiveDir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "WebKitBuild"))
 
 def createZip(directoryToZip, configuration, archiveConfigurationOnMac=False):
     archiveDir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "WebKitBuild"))
-
-    # Chromium bots may not have this directory
-    if not os.path.isdir(archiveDir):
-        os.mkdir(archiveDir)
-
     archiveFile = os.path.join(archiveDir, configuration + ".zip")
 
     try:
     archiveFile = os.path.join(archiveDir, configuration + ".zip")
 
     try:
@@ -118,7 +113,7 @@ def createZip(directoryToZip, configuration, archiveConfigurationOnMac=False):
 
 
 def archiveBuiltProduct(configuration, platform, fullPlatform):
 
 
 def archiveBuiltProduct(configuration, platform, fullPlatform):
-    assert platform in ('mac', 'win', 'qt', 'gtk', 'efl', 'chromium')
+    assert platform in ('mac', 'win', 'qt', 'gtk', 'efl')
 
     configurationBuildDirectory = os.path.join(_buildDirectory, configuration.title())
 
 
     configurationBuildDirectory = os.path.join(_buildDirectory, configuration.title())
 
@@ -162,26 +157,6 @@ def archiveBuiltProduct(configuration, platform, fullPlatform):
         if createZip(thinDirectory, configuration):
             return 1
 
         if createZip(thinDirectory, configuration):
             return 1
 
-    elif platform == 'chromium':
-        print "Archiving", configurationBuildDirectory
-        thinDirectory = os.path.join(configurationBuildDirectory, "thin")
-
-        # The scripts use the existence of out/Release/build.ninja to decide
-        # if this is a ninja build, so don't exclude build.ninja from the
-        # archive.
-        ignorePatterns = ['.svn', '*.a', '*.d', '*.dSYM', '*.o', '*.ilk', '*.lib', '*.idb',
-                          'BuildLog.htm', '*.obj', '*.pdb', '*.pch', '*.tlog', '*.lastbuildstate',
-                          '*.h', '*.c', '*.cc', '*.cpp', '*.stamp']
-
-        if fullPlatform and fullPlatform == 'chromium-android':
-            ignorePatterns.extend(['*.so', '*-unaligned.apk', '*-unsigned.apk'])
-
-        removeDirectoryIfExists(thinDirectory)
-        copyBuildFiles(configurationBuildDirectory, thinDirectory, ignorePatterns)
-        if createZip(thinDirectory, configuration):
-            return 1
-
-
 def unzipArchive(directoryToExtractTo, configuration):
     archiveDir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "WebKitBuild"))
     assert os.path.isdir(archiveDir)
 def unzipArchive(directoryToExtractTo, configuration):
     archiveDir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "WebKitBuild"))
     assert os.path.isdir(archiveDir)
@@ -202,7 +177,7 @@ def unzipArchive(directoryToExtractTo, configuration):
 
 
 def extractBuiltProduct(configuration, platform):
 
 
 def extractBuiltProduct(configuration, platform):
-    assert platform in ('mac', 'win', 'qt', 'gtk', 'efl', 'chromium')
+    assert platform in ('mac', 'win', 'qt', 'gtk', 'efl')
 
     archiveFile = os.path.join(_buildDirectory, configuration + ".zip")
     configurationBuildDirectory = os.path.join(_buildDirectory, configuration.title())
 
     archiveFile = os.path.join(_buildDirectory, configuration + ".zip")
     configurationBuildDirectory = os.path.join(_buildDirectory, configuration.title())
@@ -223,7 +198,7 @@ def extractBuiltProduct(configuration, platform):
             return 1
 
         return unzipArchive(configurationBuildDirectory, configuration)
             return 1
 
         return unzipArchive(configurationBuildDirectory, configuration)
-    elif platform == 'qt' or platform == 'gtk' or platform == 'efl' or platform == 'chromium':
+    elif platform == 'qt' or platform == 'gtk' or platform == 'efl':
         print "Extracting", configurationBuildDirectory
         return unzipArchive(configurationBuildDirectory, configuration)
 
         print "Extracting", configurationBuildDirectory
         return unzipArchive(configurationBuildDirectory, configuration)
 
diff --git a/Tools/BuildSlaveSupport/chromium/output-android-device-status b/Tools/BuildSlaveSupport/chromium/output-android-device-status
deleted file mode 100755 (executable)
index d716c02..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env python
-# 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.
-# 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.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 INC. OR
-# 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 re
-import subprocess
-import sys
-
-def GetAttachedDevices():
-    re_device = re.compile('^([a-zA-Z0-9_:.-]+)\tdevice$', re.MULTILINE)
-    process = subprocess.Popen(['adb', 'devices'], stdout=subprocess.PIPE)
-    return re_device.findall(process.communicate()[0])
-
-
-class AndroidDeviceStatus(object):
-    def __init__(self, device_serial):
-        self._device_serial = device_serial
-
-    def _run_adb_command(self, command):
-        full_command = ['adb', '-s', self._device_serial] + command
-        stdout, _ = subprocess.Popen(full_command, stdout=subprocess.PIPE).communicate()
-        return stdout.strip()
-
-    def device_type(self):
-        return self._run_adb_command(['shell', 'getprop', 'ro.build.product'])
-
-    def device_build(self):
-        return self._run_adb_command(['shell', 'getprop', 'ro.build.id'])
-
-    def device_fingerprint(self):
-        return self._run_adb_command(['shell', 'getprop', 'ro.build.fingerprint'])
-
-    def battery_level(self):
-        return self._run_adb_command(['shell', 'cat', '/sys/class/power_supply/battery/capacity'])
-
-    def battery_temperature(self):
-        temperature = self._run_adb_command(['shell', 'dumpsys', 'battery'])
-        re_temperature = re.compile('temperature:\s+(\d+)')
-        return re_temperature.findall(temperature)[0]
-
-    def username(self):
-        username = self._run_adb_command(['shell', 'id'])
-        re_username = re.compile('uid=\d+\((.+?)\)')
-        return re_username.findall(username)[0]
-
-
-def main():
-    devices = GetAttachedDevices()
-    for device_serial in devices:
-        device_status = AndroidDeviceStatus(device_serial)
-
-        print 'Device %s (%s)' % (device_serial, device_status.device_type())
-        print '  Build: %s (%s)' % (device_status.device_build(), device_status.device_fingerprint())
-        print '  Battery: %s%%' % device_status.battery_level()
-        print '  Battery temp: %s' % device_status.battery_temperature()
-        print '  Username: %s' % device_status.username()
-        print ''
-
-
-if __name__ == '__main__':
-    sys.exit(main())
diff --git a/Tools/BuildSlaveSupport/chromium/remove-crash-logs b/Tools/BuildSlaveSupport/chromium/remove-crash-logs
deleted file mode 100755 (executable)
index 4f999c4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2011 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:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * 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.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
-# OWNER OR 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 os
-import sys
-
-if __name__ == '__main__':
-    if sys.platform == 'linux2':
-        os.system('rm -rf /tmp/.org.chromium.*')
-    elif sys.platform == 'darwin':
-        import Foundation
-        os.system('rm -rf %s' % os.path.join(Foundation.NSTemporaryDirectory(),
-                                             '.org.chromium.*'))
-    elif 'win' in sys.platform:
-        os.system('for /d %d in (%TEMP%\scoped_dir*) do rd /s /q "%d"')
index 4f1f75eaff99e57f106645a18b3251bd99052dc1..402df65744866f4bf063b17726e02dceb6c9cd8a 100644 (file)
@@ -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.
 
 # (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")
 
 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):
     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)
 
     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 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)
 
     try:
         shutil.rmtree(layoutTestResultsDir)
@@ -91,26 +86,5 @@ def archiveTestResults(configuration, platform, layoutTestResultsDir):
         if e.errno != 90 and e.errno != 2:
             raise
 
         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())
 if __name__ == '__main__':
     sys.exit(main())
index d89f32a7530394aae7ea2ba0fa377abe985fd647..c6e6cc772311636bbb2519402310d4f6cddc874c 100644 (file)
@@ -1,3 +1,21 @@
+2013-04-28  Zan Dobersek  <zdobersek@igalia.com>
+
+        Remove Chromium code from Tools/BuildSlaveSupport
+        https://bugs.webkit.org/show_bug.cgi?id=115325
+
+        Reviewed by Benjamin Poulain.
+
+        Remove the two Chromium-specific scripts and the Chromium-specific parts from the code
+        covering archiving test results and built products.
+
+        * BuildSlaveSupport/built-product-archive:
+        (archiveBuiltProduct):
+        (extractBuiltProduct):
+        * BuildSlaveSupport/chromium/output-android-device-status: Removed.
+        * BuildSlaveSupport/chromium/remove-crash-logs: Removed.
+        * BuildSlaveSupport/test-result-archive:
+        (archiveTestResults):
+
 2013-04-28  Seokju Kwon  <seokju.kwon@gmail.com>
 
         Remove support for Chromium from webkitdirs.pm
 2013-04-28  Seokju Kwon  <seokju.kwon@gmail.com>
 
         Remove support for Chromium from webkitdirs.pm