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:
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())
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 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())
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)
+++ /dev/null
-#!/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())
+++ /dev/null
-#!/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"')
# (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")
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)
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)
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())
+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