ubuntu-server-iso-testing-dev team mailing list archive
-
ubuntu-server-iso-testing-dev team
-
Mailing list archive
-
Message #00160
[Merge] lp:~james-page/ubuntu-server-iso-testing/updates-for-oneiric into lp:ubuntu-server-iso-testing
James Page has proposed merging lp:~james-page/ubuntu-server-iso-testing/updates-for-oneiric into lp:ubuntu-server-iso-testing.
Requested reviews:
Ubuntu Server Iso Testing Developers (ubuntu-server-iso-testing-dev)
For more details, see:
https://code.launchpad.net/~james-page/ubuntu-server-iso-testing/updates-for-oneiric/+merge/82293
Refactoring into a single ubuntu-iso-testing source and binary package; run-test also now supports a -t flag to allow separation of tests from code.
--
https://code.launchpad.net/~james-page/ubuntu-server-iso-testing/updates-for-oneiric/+merge/82293
Your team Ubuntu Server Iso Testing Developers is requested to review the proposed merge of lp:~james-page/ubuntu-server-iso-testing/updates-for-oneiric into lp:ubuntu-server-iso-testing.
=== modified file 'configuration/iso-testing-network.xml'
--- configuration/iso-testing-network.xml 2011-06-26 14:06:40 +0000
+++ configuration/iso-testing-network.xml 2011-11-15 16:04:43 +0000
@@ -7,7 +7,7 @@
<range start='192.168.123.2' end='192.168.123.254' />
<bootp file='pxelinux.0'/>
</dhcp>
- <tftp root='/var/lib/ubuntu-server-iso-testing/tftp'/>
+ <tftp root='/var/lib/ubuntu-iso-testing/tftp'/>
</ip>
</network>
=== removed file 'debian/README'
--- debian/README 2010-12-01 17:48:05 +0000
+++ debian/README 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-The Debian Package ubuntu-server-iso-testing
-----------------------------
-
-Comments regarding the Package
-
- -- James Page <james.page@xxxxxxxxxxxxx> Wed, 01 Dec 2010 08:29:07 +0000
=== modified file 'debian/changelog'
--- debian/changelog 2011-11-09 14:35:05 +0000
+++ debian/changelog 2011-11-15 16:04:43 +0000
@@ -1,3 +1,10 @@
+ubuntu-iso-testing (1.2) oneiric; urgency=low
+
+ * Refactoring to support oneiric release.
+ * Renaming of package to ubuntu-iso-testing.
+
+ -- James Page <james.page@xxxxxxxxxx> Tue, 15 Nov 2011 09:13:17 -0500
+
ubuntu-server-iso-testing (1.1~natty4) natty; urgency=low
* download-latest-test-iso.py: Update DEFAULT_RELEASE to precise.
=== modified file 'debian/control'
--- debian/control 2011-06-26 14:06:40 +0000
+++ debian/control 2011-11-15 16:04:43 +0000
@@ -1,62 +1,12 @@
-Source: ubuntu-server-iso-testing
+Source: ubuntu-iso-testing
Section: misc
Priority: extra
Maintainer: Ubuntu Server ISO Testing Developers <ubuntu-server-iso-testing-dev@xxxxxxxxxxxxxxxxxxx>
Build-Depends: debhelper (>= 7.0.50~)
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
Homepage: https://launchpad.net/ubuntu-server-iso-testing
-Package: ubuntu-server-iso-testing
-Architecture: amd64 i386
-Depends: ubuntu-iso-testing-common, ${misc:Depends}, ${python:Depends}
-Description: Ubuntu Server ISO Testing framework
- This package provides the Ubuntu Server ISO testing framework,
- a python + libvirt/kvm based framework for automating the
- testing of Ubuntu Server ISO images in-conjunction with a
- Hudson continuous integration server.
-
-Package: hudson-slave
-Architecture: all
-Depends:
- adduser,
- default-jre-headless | java2-runtime-headless,
- python,
- python-setuptools,
- ${misc:Depends},
- ${python:Depends}
-Description: Hudson slave base package
- This package installs the required dependencies to operate
- a Hudson slave machine and create a utility script and upstart
- configuration to automatically start the slave on boot.
-
-Package: ubuntu-alternate-iso-testing
-Architecture: amd64 i386
-Depends: ubuntu-iso-testing-common, ${misc:Depends}, ${python:Depends}
-Description: Ubuntu Alternate ISO Testing framework
- This package provides the Ubuntu Alternate ISO testing framework,
- a python + libvirt/kvm based framework for automating the
- testing of Ubuntu Alternate ISO images in-conjunction with a
- Hudson continuous integration server.
-
-Package: ubuntu-desktop-iso-testing
-Architecture: amd64 i386
-Depends: ubuntu-iso-testing-common, ${misc:Depends}, ${python:Depends}
-Description: Ubuntu Desktop ISO Testing framework
- This package provides the Ubuntu Desktop ISO testing framework,
- a python + libvirt/kvm based framework for automating the
- testing of Ubuntu Desktop ISO images in-conjunction with a
- Hudson continuous integration server.
-
-Package: ubuntu-kernel-iso-testing
-Architecture: amd64 i386
-Depends: ubuntu-iso-testing-common, ${misc:Depends}, ${python:Depends}
-Description: Ubuntu Kernel ISO Testing framework
- This package provides the Ubuntu Kernel ISO testing framework,
- a python + libvirt/kvm based framework for automating the
- testing of Ubuntu Desktop ISO images in-conjunction with a
- Hudson continuous integration server.
-
-Package: ubuntu-iso-testing-common
+Package: ubuntu-iso-testing
Architecture: amd64 i386
Depends:
adduser,
@@ -64,7 +14,7 @@
bsdtar,
couchdb,
curl,
- hudson-slave,
+ jenkins-slave,
kvm,
kvm-pxe,
libvirt-bin,
@@ -78,6 +28,6 @@
ubuntu-qa-tools,
${misc:Depends},
${python:Depends}
-Description: Ubuntu ISO Testing framework - common components
- This package provides the common components for both Desktop and Server
+Description: Ubuntu ISO Testing framework
+ This package provides the framework for both Desktop and Server
ISO testing frameworks.
=== removed file 'debian/dirs'
--- debian/dirs 2011-01-12 20:47:12 +0000
+++ debian/dirs 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-usr/share/ubuntu-server-iso-testing/templates
=== removed file 'debian/hudson-slave.default'
--- debian/hudson-slave.default 2010-12-14 09:42:06 +0000
+++ debian/hudson-slave.default 1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-# init configuration script for hudson-slave
-# User and Group to execute slave daemon asa
-# defaults to the ubuntu server iso testing
-# account as part of this package
-USER=usit
-GROUP=nogroup
-# URL to access Hudson Master Server
-HUDSON_MASTER=
-# Options to pass to hudson-slave
-# OPTS="-d"
-# Run at startup
-STARTUP=false
=== removed file 'debian/hudson-slave.install'
--- debian/hudson-slave.install 2010-12-14 09:42:06 +0000
+++ debian/hudson-slave.install 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-hudson-slave.py usr/share/hudson-slave/python
=== removed file 'debian/hudson-slave.links'
--- debian/hudson-slave.links 2010-12-14 09:42:06 +0000
+++ debian/hudson-slave.links 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-usr/share/hudson-slave/python/hudson-slave.py /usr/bin/hudson-slave
=== removed file 'debian/hudson-slave.upstart'
--- debian/hudson-slave.upstart 2010-12-14 09:42:06 +0000
+++ debian/hudson-slave.upstart 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-# Hudson Slave
-
-description "hudson-slave: distributed job control"
-author "James Page <james.page@xxxxxxxxxxxxx>"
-
-start on (local-filesystems and net-device-up IFACE!=lo)
-stop on runlevel [!2345]
-
-pre-start script
- . /etc/default/hudson-slave
- test -x /usr/bin/hudson-slave || { stop ; exit 0; }
- test -r /etc/default/hudson-slave || { stop ; exit 0; }
- test "${STARTUP}" = "true" || { stop; exit 0; }
-end script
-
-script
- . /etc/default/hudson-slave
-
- JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun"
- for jdir in $JDK_DIRS; do
- if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
- JAVA_HOME="$jdir"
- fi
- done
- export JAVA_HOME
-
- exec start-stop-daemon --start --chuid $USER:$GROUP --exec /usr/bin/hudson-slave -- $OPTS $HUDSON_MASTER
-end script
=== removed file 'debian/install'
--- debian/install 2011-06-26 14:06:40 +0000
+++ debian/install 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
-
-
-templates/* usr/share/ubuntu-server-iso-testing/templates
=== removed file 'debian/ubuntu-alternate-iso-testing.dirs'
--- debian/ubuntu-alternate-iso-testing.dirs 2011-03-04 14:08:07 +0000
+++ debian/ubuntu-alternate-iso-testing.dirs 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-usr/share/ubuntu-server-iso-testing/templates.alternate
=== removed file 'debian/ubuntu-alternate-iso-testing.install'
--- debian/ubuntu-alternate-iso-testing.install 2011-06-26 14:06:40 +0000
+++ debian/ubuntu-alternate-iso-testing.install 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-
-templates.alternate/* usr/share/ubuntu-server-iso-testing/templates.alternate
=== removed file 'debian/ubuntu-desktop-iso-testing.dirs'
--- debian/ubuntu-desktop-iso-testing.dirs 2011-01-12 20:47:12 +0000
+++ debian/ubuntu-desktop-iso-testing.dirs 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-usr/share/ubuntu-server-iso-testing/templates.desktop
=== removed file 'debian/ubuntu-desktop-iso-testing.install'
--- debian/ubuntu-desktop-iso-testing.install 2011-06-26 14:06:40 +0000
+++ debian/ubuntu-desktop-iso-testing.install 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-
-templates.desktop/* usr/share/ubuntu-server-iso-testing/templates.desktop
=== renamed file 'debian/ubuntu-iso-testing-common.dirs' => 'debian/ubuntu-iso-testing.dirs'
--- debian/ubuntu-iso-testing-common.dirs 2011-06-15 12:06:07 +0000
+++ debian/ubuntu-iso-testing.dirs 2011-11-15 16:04:43 +0000
@@ -1,5 +1,5 @@
usr/bin
-usr/share/ubuntu-server-iso-testing
-var/lib/ubuntu-server-iso-testing
-var/lib/ubuntu-server-iso-testing/tftp
-var/log/ubuntu-server-iso-testing
+usr/share/ubuntu-iso-testing
+var/lib/ubuntu-iso-testing
+var/lib/ubuntu-iso-testing/tftp
+var/log/ubuntu-iso-testing
=== renamed file 'debian/docs' => 'debian/ubuntu-iso-testing.docs'
=== renamed file 'debian/ubuntu-iso-testing-common.install' => 'debian/ubuntu-iso-testing.install'
--- debian/ubuntu-iso-testing-common.install 2011-07-28 15:24:30 +0000
+++ debian/ubuntu-iso-testing.install 2011-11-15 16:04:43 +0000
@@ -1,8 +1,11 @@
# Main part of ISO testing
-download-latest-test-iso.py usr/share/ubuntu-server-iso-testing/python
-run-test.py usr/share/ubuntu-server-iso-testing/python
+download-latest-test-iso.py usr/share/ubuntu-iso-testing/python
+run-test.py usr/share/ubuntu-iso-testing/python
unbsdtar-safelink /usr/bin
# Configuration for couchdb
-configuration/couchdb-iso-testing.ini usr/share/ubuntu-server-iso-testing/configuration
+configuration/couchdb-iso-testing.ini usr/share/ubuntu-iso-testing/configuration
# Configuration for libvirtd - deployed in postinst
-configuration/iso-testing-network.xml usr/share/ubuntu-server-iso-testing/configuration
+configuration/iso-testing-network.xml usr/share/ubuntu-iso-testing/configuration
+# Install some default templates just in case someone is not
+# using the official branch for the release
+templates* usr/share/ubuntu-iso-testing
=== renamed file 'debian/ubuntu-iso-testing-common.links' => 'debian/ubuntu-iso-testing.links'
--- debian/ubuntu-iso-testing-common.links 2011-01-12 20:47:12 +0000
+++ debian/ubuntu-iso-testing.links 2011-11-15 16:04:43 +0000
@@ -1,4 +1,2 @@
-usr/share/ubuntu-server-iso-testing/python/run-test.py /usr/bin/run-test
-usr/share/ubuntu-server-iso-testing/python/download-latest-test-iso.py /usr/bin/download-latest-test-iso
-usr/share/ubuntu-server-iso-testing/python/setup-hudson.py /usr/bin/setup-hudson
-
+usr/share/ubuntu-iso-testing/python/run-test.py /usr/bin/run-test
+usr/share/ubuntu-iso-testing/python/download-latest-test-iso.py /usr/bin/download-latest-test-iso
=== renamed file 'debian/ubuntu-iso-testing-common.postinst' => 'debian/ubuntu-iso-testing.postinst'
--- debian/ubuntu-iso-testing-common.postinst 2011-06-26 14:40:35 +0000
+++ debian/ubuntu-iso-testing.postinst 2011-11-15 16:04:43 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# postinst script for ubuntu-server-iso-testing
+# postinst script for ubuntu-iso-testing
#
# see: dh_installdeb(1)
@@ -21,7 +21,7 @@
configure)
# Create usit user if it doesn't exist.
if ! id usit > /dev/null 2>&1 ; then
- adduser --system --home /var/lib/ubuntu-server-iso-testing --no-create-home \
+ adduser --system --home /var/lib/ubuntu-iso-testing --no-create-home \
--ingroup nogroup --disabled-password --quiet --shell /bin/bash \
usit || true
# Add usit to libvirtd as required access to vm management
@@ -38,29 +38,29 @@
# This is copied direct from the Hudson debian package
# and relates to edge cases on dir perms for ssh key authentication
# change group/owner to usit:adm - exclude jobs directory.
- find /var/lib/ubuntu-server-iso-testing -path "*jobs" -prune -o -exec chown usit:adm {} + || true
+ find /var/lib/ubuntu-iso-testing -path "*jobs" -prune -o -exec chown usit:adm {} + || true
# Setup TFTP root for testing
- mkdir -p /var/lib/ubuntu-server-iso-testing/tftp/pxelinux.cfg || true
+ mkdir -p /var/lib/ubuntu-iso-testing/tftp/pxelinux.cfg || true
# Link in pxelinux.0 from syslinux-common package
ln -sf /usr/lib/syslinux/pxelinux.0 \
- /var/lib/ubuntu-server-iso-testing/tftp/pxelinux.0 || true
+ /var/lib/ubuntu-iso-testing/tftp/pxelinux.0 || true
# Fix permissions on tftp dir
- chown -R usit:adm /var/lib/ubuntu-server-iso-testing/tftp || true
+ chown -R usit:adm /var/lib/ubuntu-iso-testing/tftp || true
- # /var/run/ubuntu-server-iso-testing
- chown -R usit:adm /var/log/ubuntu-server-iso-testing || true
+ # /var/run/ubuntu-iso-testing
+ chown -R usit:adm /var/log/ubuntu-iso-testing || true
# change mode to 755 - exclude jobs and .ssh directories.
- find /var/lib/ubuntu-server-iso-testing -path "*jobs" -prune -o -path "*.ssh" -prune -o \
+ find /var/lib/ubuntu-iso-testing -path "*jobs" -prune -o -path "*.ssh" -prune -o \
-path "pxelinux.0" -prune -o -exec chmod 755 {} + || true
- # chmod -R 755 /var/run/ubuntu-server-iso-testing || true
- chmod 755 /var/log/ubuntu-server-iso-testing || true
+ # chmod -R 755 /var/run/ubuntu-iso-testing || true
+ chmod 755 /var/log/ubuntu-iso-testing || true
if [ ! $(virsh net-uuid iso-testing 2>/dev/null) ]; then
echo "Setting up libvirt network configuration"
# Setup new network in libvirtd for iso testing
# Create new setup
- virsh net-define /usr/share/ubuntu-server-iso-testing/configuration/iso-testing-network.xml 2>&1 >/dev/null
+ virsh net-define /usr/share/ubuntu-iso-testing/configuration/iso-testing-network.xml 2>&1 >/dev/null
# Mark as autostart for next reboot
virsh net-autostart iso-testing 2>&1 > /dev/null
# Startup network
@@ -68,7 +68,7 @@
fi
# Deploy couchdb configuration and restart
- ln -sf /usr/share/ubuntu-server-iso-testing/configuration/couchdb-iso-testing.ini \
+ ln -sf /usr/share/ubuntu-iso-testing/configuration/couchdb-iso-testing.ini \
/etc/couchdb/local.d/iso-testing.ini
if [ -x /etc/init.d/couchdb ]; then
=== renamed file 'debian/ubuntu-iso-testing-common.postrm' => 'debian/ubuntu-iso-testing.postrm'
--- debian/ubuntu-iso-testing-common.postrm 2011-06-26 14:40:35 +0000
+++ debian/ubuntu-iso-testing.postrm 2011-11-15 16:04:43 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# postrm script for ubuntu-server-iso-testing
+# postrm script for ubuntu-iso-testing
#
# see: dh_installdeb(1)
@@ -23,9 +23,9 @@
# Remove usit user
userdel usit || true
# Remove log files
- rm -Rf /var/log/ubuntu-server-iso-testing || true
+ rm -Rf /var/log/ubuntu-iso-testing || true
# Purge user home directory
- rm -Rf /var/lib/ubuntu-server-iso-testing || true
+ rm -Rf /var/lib/ubuntu-iso-testing || true
if [ $(virsh net-uuid iso-testing 2>/dev/null) ]; then
# Remove iso-testing config from virsh
=== removed file 'debian/ubuntu-kernel-iso-testing.dirs'
--- debian/ubuntu-kernel-iso-testing.dirs 2011-06-15 12:06:07 +0000
+++ debian/ubuntu-kernel-iso-testing.dirs 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-usr/share/ubuntu-server-iso-testing/templates.kernel
=== removed file 'debian/ubuntu-kernel-iso-testing.install'
--- debian/ubuntu-kernel-iso-testing.install 2011-06-26 14:06:40 +0000
+++ debian/ubuntu-kernel-iso-testing.install 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-
-templates.kernel/* usr/share/ubuntu-server-iso-testing/templates.kernel
=== removed file 'debian/ubuntu-server-iso-testing.doc-base'
--- debian/ubuntu-server-iso-testing.doc-base 2010-12-01 17:48:05 +0000
+++ debian/ubuntu-server-iso-testing.doc-base 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-Document: ubuntu-server-iso-testing
-Title: Debian ubuntu-server-iso-testing Manual
-Author: James Page
-Abstract: This manual describes what ubuntu-server-iso-testing is
- and how it can be used to to automate Ubuntu Server ISO testing.
-Section: Debian
-
-Format: text
-Files: /usr/share/doc/ubuntu-server-iso-testing/README.gz
=== modified file 'download-latest-test-iso.py'
--- download-latest-test-iso.py 2011-11-09 14:35:05 +0000
+++ download-latest-test-iso.py 2011-11-15 16:04:43 +0000
@@ -2,20 +2,20 @@
#
# Copyright (C) 2010-2011, Canonical Ltd (http://www.canonical.com/)
#
-# This file is part of ubuntu-server-iso-testing.
+# This file is part of ubuntu-iso-testing.
#
-# ubuntu-server-iso-testing is free software: you can redistribute it
+# ubuntu-iso-testing is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
-# ubuntu-server-iso-testing is distributed in the hope that it will
+# ubuntu-iso-testing is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
+# along with ubuntu-iso-testing. If not, see
# <http://www.gnu.org/licenses/>.
#
from lockfile import FileLock
@@ -72,6 +72,7 @@
cmd = ['dl-ubuntu-test-iso', '--variant=%s' % variant,
'--arch=%s' % arch, '--release=%s' % release,
'--build=current' ,'--isoroot=%s' % isoroot, '-P']
+
if flavor:
cmd.append('--flavor=%s' % flavor)
@@ -79,6 +80,7 @@
cmd.append('-n')
logging.debug("Cmd: %s", cmd)
+
try:
subprocess.check_call(cmd)
except subprocess.CalledProcessError, e:
=== removed file 'hudson-slave.py'
--- hudson-slave.py 2010-12-01 17:48:05 +0000
+++ hudson-slave.py 1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
-#
-# This file is part of ubuntu-server-iso-testing.
-#
-# ubuntu-server-iso-testing is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# ubuntu-server-iso-testing is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-
-import logging
-import optparse
-import os
-import urllib
-import sys
-import subprocess
-import socket
-
-usage="usage: %prog [options] HUDSON_URL"
-parser = optparse.OptionParser(usage=usage)
-parser.add_option("-d", "--debug", dest="debug", action="store_true", default=False,
- help="enable debugging")
-parser.add_option("-n", "--nodename", dest="nodename", default=socket.gethostname(),
- help="hostname to use when registering with hudson (default=hostname)")
-(options, args) = parser.parse_args()
-
-if len(args) == 0:
- logging.error("Need a HUDSON_URL to execute")
- parser.print_help()
- sys.exit(1)
-
-if options.debug:
- logging.basicConfig(level=logging.DEBUG)
-else:
- logging.basicConfig(level=logging.INFO)
-
-HUDSON_URL=args[0]
-HUDSON_PATH="/computer/%s/slave-agent.jnlp"
-SLAVE_URL=HUDSON_URL + 'jnlpJars/slave.jar'
-SLAVE_JAR=os.path.expanduser("~/.slave.jar")
-
-l_hudson_url= HUDSON_URL + HUDSON_PATH % options.nodename
-
-logging.debug("Retrieving hudson slave.jar")
-urllib.urlretrieve(SLAVE_URL, SLAVE_JAR)
-
-cmd = [ 'java','-jar', SLAVE_JAR, '-jnlpUrl', l_hudson_url ]
-logging.debug("Cmd: %s" % (cmd))
-subprocess.check_call(cmd)
=== removed file 'hudson.py'
--- hudson.py 2010-09-15 14:55:39 +0000
+++ hudson.py 1970-01-01 00:00:00 +0000
@@ -1,278 +0,0 @@
-#!/usr/bin/env python
-# Software License Agreement (BSD License)
-#
-# Copyright (c) 2010, Willow Garage, 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 Willow Garage, 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.
-#
-# Revision $Id$
-# $Author$
-
-"""
-Python API for Hudson
-
-Examples:
-
- hudson.create_job('empty', EMPTY_CONFIG_XML)
- hudson.disable_job('empty')
- hudson.copy_job('empty', 'empty_copy')
- hudson.enable_job('empty_copy')
- hudson.reconfig_job('empty_copy', RECONFIG_XML)
-
- hudson.delete_job('empty')
- hudson.delete_job('empty_copy')
-
- # build a parameterized job
- hudson.build_job('api-test', {'param1': 'test value 1', 'param2': 'test value 2'})
-"""
-
-import sys
-import urllib2
-import urllib
-import base64
-import traceback
-
-JOB_INFO = 'job/%(name)s/api/python?depth=0'
-Q_INFO = 'queue/api/python?depth=0'
-CREATE_JOB = 'createItem?name=%(name)s' #also post config.xml
-RECONFIG_JOB = 'job/%(name)s/config.xml'
-DELETE_JOB = 'job/%(name)s/doDelete'
-ENABLE_JOB = 'job/%(name)s/enable'
-DISABLE_JOB = 'job/%(name)s/disable'
-COPY_JOB = 'createItem?name=%(to_name)s&mode=copy&from=%(from_name)s'
-BUILD_JOB = 'job/%(name)s/build'
-BUILD_WITH_PARAMS_JOB = 'job/%(name)s/buildWithParameters'
-
-#for testing only
-EMPTY_CONFIG_XML = """<?xml version='1.0' encoding='UTF-8'?>
-<project>
- <keepDependencies>false</keepDependencies>
- <properties/>
- <scm class="hudson.scm.NullSCM"/>
- <canRoam>true</canRoam>
- <disabled>false</disabled>
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
- <triggers class="vector"/>
- <concurrentBuild>false</concurrentBuild>
- <builders/>
- <publishers/>
- <buildWrappers/>
-</project>"""
-
-#for testing only
-RECONFIG_XML = """<?xml version='1.0' encoding='UTF-8'?>
-<project>
- <keepDependencies>false</keepDependencies>
- <properties/>
- <scm class="hudson.scm.NullSCM"/>
- <canRoam>true</canRoam>
- <disabled>false</disabled>
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
- <triggers class="vector"/>
- <concurrentBuild>false</concurrentBuild>
-<builders>
- <hudson.tasks.Shell>
- <command>export FOO=bar</command>
- </hudson.tasks.Shell>
- </builders>
- <publishers/>
- <buildWrappers/>
-</project>"""
-
-class HudsonException(Exception): pass
-
-def auth_headers(username, password):
- """
- Simple implementation of HTTP Basic Authentication. Returns the 'Authentication' header value.
- """
- return 'Basic ' + base64.encodestring("%s:%s" % (username, password))[:-1]
-
-class Hudson(object):
-
- def __init__(self, url, username=None, password=None):
- """
- Create handle to Hudson instance.
-
- @param url: URL of Hudson server
- @type url: str
- """
- if url[-1] == '/':
- self.server = url
- else:
- self.server = url + '/'
- if username is not None and password is not None:
- self.auth = auth_headers(username, password)
- else:
- self.auth = None
-
- def get_job_info(self, name):
- try:
- return eval(urllib2.urlopen(self.server + JOB_INFO%locals()).read())
- except:
- raise HudsonException("job[%s] does not exist"%name)
-
- def debug_job_info(self, job_name):
- """
- Print out job info in more readable format
- """
- for k, v in self.get_job_info(job_name).iteritems():
- print k, v
-
- def hudson_open(self, req):
- """
- Utility routine for opening an HTTP request to a Hudson server.
- """
- try:
- if self.auth:
- req.add_header('Authorization', self.auth)
- return urllib2.urlopen(req).read()
- except urllib2.HTTPError, e:
- # Hudson's funky authentication means its nigh impossible to distinguish errors.
- if e.code in [401, 403, 500]:
- raise HudsonException("Error in request. Possibly authentication failed [%s]"%(e.code))
- # right now I'm getting 302 infinites on a successful delete
-
- def get_queue_info(self):
- """
- @return: list of job dictionaries
- """
- return eval(urllib2.urlopen(self.server + Q_INFO).read())['items']
-
- def copy_job(self, from_name, to_name):
- """
- Copy a Hudson job
-
- @param from_name: Name of Hudson job to copy from
- @type from_name: str
- @param to_name: Name of Hudson job to copy to
- @type to_name: str
- """
- self.get_job_info(from_name)
- self.hudson_open(urllib2.Request(self.server + COPY_JOB%locals(), ''))
- if not self.job_exists(to_name):
- raise HudsonException("create[%s] failed"%(to_name))
-
- def delete_job(self, name):
- """
- Delete Hudson job permanently.
-
- @param name: Name of Hudson job
- @type name: str
- """
- self.get_job_info(name)
- self.hudson_open(urllib2.Request(self.server + DELETE_JOB%locals(), ''))
- if self.job_exists(name):
- raise HudsonException("delete[%s] failed"%(name))
-
- def enable_job(self, name):
- """
- Enable Hudson job.
-
- @param name: Name of Hudson job
- @type name: str
- """
- self.get_job_info(name)
- self.hudson_open(urllib2.Request(self.server + ENABLE_JOB%locals(), ''))
-
- def disable_job(self, name):
- """
- Disable Hudson job. To re-enable, call enable_job().
-
- @param name: Name of Hudson job
- @type name: str
- """
- self.get_job_info(name)
- self.hudson_open(urllib2.Request(self.server + DISABLE_JOB%locals(), ''))
-
- def job_exists(self, name):
- """
- @param name: Name of Hudson job
- @type name: str
- @return: True if Hudson job exists
- """
- try:
- self.get_job_info(name)
- return True
- except:
- return False
-
- def create_job(self, name, config_xml):
- """
- Create a new Hudson job
-
- @param name: Name of Hudson job
- @type name: str
- @param config_xml: config file text
- @type config_xml: str
- """
- if self.job_exists(name):
- raise HudsonException("job[%s] already exists"%(name))
-
- headers = {'Content-Type': 'text/xml'}
- self.hudson_open(urllib2.Request(self.server + CREATE_JOB%locals(), config_xml, headers))
- if not self.job_exists(name):
- raise HudsonException("create[%s] failed"%(name))
-
- def reconfig_job(self, name, config_xml):
- """
- Change configuration of existing Hudson job.
-
- @param name: Name of Hudson job
- @type name: str
- @param config_xml: New XML configuration
- @type config_xml: str
- """
- self.get_job_info(name)
- headers = {'Content-Type': 'text/xml'}
- reconfig_url = self.server + RECONFIG_JOB%locals()
- self.hudson_open(urllib2.Request(reconfig_url, config_xml, headers))
-
- def build_job_url(self, name, parameters=None, token=None):
- """
- @param parameters: parameters for job, or None.
- @type parameters: dict
- """
- if parameters:
- if token:
- parameters['token'] = token
- return self.server + BUILD_WITH_PARAMS_JOB%locals() + '?' + urllib.urlencode(parameters)
- elif token:
- return self.server + BUILD_JOB%locals() + '?' + urllib.urlencode({'token': token})
- else:
- return self.server + BUILD_JOB%locals()
-
- def build_job(self, name, parameters=None, token=None):
- """
- @param parameters: parameters for job, or None.
- @type parameters: dict
- """
- if not self.job_exists(name):
- raise HudsonException("no such job[%s]"%(name))
- return self.hudson_open(urllib2.Request(self.build_job_url(name, parameters, token), ''))
-
=== modified file 'run-test.py'
--- run-test.py 2011-08-25 22:14:14 +0000
+++ run-test.py 2011-11-15 16:04:43 +0000
@@ -2,20 +2,20 @@
#
# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
#
-# This file is part of ubuntu-server-iso-testing.
+# This file is part of ubuntu-iso-testing.
#
-# ubuntu-server-iso-testing is free software: you can redistribute it
+# ubuntu-iso-testing is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
-# ubuntu-server-iso-testing is distributed in the hope that it will
+# ubuntu-iso-testing is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
+# along with ubuntu-iso-testing. If not, see
# <http://www.gnu.org/licenses/>.
#
@@ -47,7 +47,7 @@
variant = variant.lower()
if variant == 'desktop':
- DEFAULT_TMPL_DIR = "/usr/share/ubuntu-server-iso-testing/templates.desktop"
+ DEFAULT_TMPL_DIR = "/usr/share/ubuntu-iso-testing/templates.desktop"
DEFAULT_TEST_TIMEOUT = 3600
DISK_SIZE = "6G"
COMPRESS_CMD = "lzma "
@@ -55,7 +55,7 @@
KERNEL_DIR = "casper"
INITRD = "initrd.lz"
elif variant in ('alternate', 'netboot'):
- DEFAULT_TMPL_DIR = "/usr/share/ubuntu-server-iso-testing/templates.alternate"
+ DEFAULT_TMPL_DIR = "/usr/share/ubuntu-iso-testing/templates.alternate"
DEFAULT_TEST_TIMEOUT = 3600
DISK_SIZE = "6G"
@@ -127,7 +127,7 @@
DEFAULT_ARCH = 'i386'
DEFAULT_FLAVOR = 'ubuntu-server'
DEFAULT_ISOROOT = os.path.expanduser('~/isos')
-DEFAULT_TMPL_DIR = "/usr/share/ubuntu-server-iso-testing/templates"
+DEFAULT_TMPL_DIR = "/usr/share/ubuntu-iso-testing/templates"
DEFAULT_TEST_TIMEOUT = 1200
DISK_FORMAT = "qcow2"
@@ -158,6 +158,8 @@
help="flavor of Ubuntu to download (default=%s)" % DEFAULT_FLAVOR)
parser.add_option("-n", "--isoname", dest="isoname", default=False,
help="specify name of a local iso file")
+parser.add_option("-t", "--tests" , dest="test_dir", default=DEFAULT_TMPL_DIR,
+ help="Location of test templates to use (default=%s)" % DEFAULT_TMPL_DIR)
(options, args) = parser.parse_args()
if options.debug:
@@ -175,7 +177,7 @@
set_config(options.variant)
# Get all environment variable for general test configuration
-TMPL_DIR = os.environ.get("TMPL_DIR", DEFAULT_TMPL_DIR)
+TMPL_DIR = options.test_dir
RUN_TEST = os.path.join(TMPL_DIR, 'run_test')
TEST_CASE_DIR = os.path.join(TMPL_DIR, 'test_cases')
PRESEED_TMPL_DIR = [os.path.join(TMPL_DIR, 'preseeds-common'), TEST_CASE_DIR]
=== modified file 'unbsdtar-safelink'
--- unbsdtar-safelink 2011-07-28 15:24:30 +0000
+++ unbsdtar-safelink 2011-11-15 16:04:43 +0000
@@ -2,20 +2,20 @@
#
# Copyright (C) 2011, Canonical Ltd (http://www.canonical.com/)
#
-# This file is part of ubuntu-server-iso-testing.
+# This file is part of ubuntu-iso-testing.
#
-# ubuntu-server-iso-testing is free software: you can redistribute it
+# ubuntu-iso-testing is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
-# ubuntu-server-iso-testing is distributed in the hope that it will
+# ubuntu-iso-testing is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with ubuntu-server-iso-testing. If not, see
+# along with ubuntu-iso-testing. If not, see
# <http://www.gnu.org/licenses/>.
#
set -e
Follow ups