← Back to team overview

ubuntu-server-iso-testing-dev team mailing list archive

lp:~ubuntu-server-iso-testing-dev/ubuntu-server-iso-testing/kernel-testing into lp:ubuntu-server-iso-testing

 

James Page has proposed merging lp:~ubuntu-server-iso-testing-dev/ubuntu-server-iso-testing/kernel-testing 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/~ubuntu-server-iso-testing-dev/ubuntu-server-iso-testing/kernel-testing/+merge/65452
-- 
https://code.launchpad.net/~ubuntu-server-iso-testing-dev/ubuntu-server-iso-testing/kernel-testing/+merge/65452
Your team Ubuntu Server Iso Testing Developers is requested to review the proposed merge of lp:~ubuntu-server-iso-testing-dev/ubuntu-server-iso-testing/kernel-testing into lp:ubuntu-server-iso-testing.
=== modified file 'debian/changelog'
--- debian/changelog	2011-06-14 15:16:41 +0000
+++ debian/changelog	2011-06-22 08:17:23 +0000
@@ -1,3 +1,19 @@
+ubuntu-server-iso-testing (1.0-1~ppa20) natty; urgency=low
+
+  * Fixed bug in download_latest_test_iso.py 
+
+ -- James Page <james.page@xxxxxxxxxxxxx>  Tue, 21 Jun 2011 13:18:48 +0100
+
+ubuntu-server-iso-testing (1.0-1~ppa19) natty; urgency=low
+
+  * Added docs/README.dev to provide help for developers of the 
+    framework and test cases.
+  * Removed requirements to restart dnsmasq be reorganising the tftp
+    directory so that generic dnsmasq configuration can be applied
+  * Added in templates.kernel package to support kernel testing
+
+ -- James Page <james.page@xxxxxxxxxxxxx>  Wed, 15 Jun 2011 11:25:14 +0100
+
 ubuntu-server-iso-testing (1.0-1~ppa16) natty; urgency=low
 
   * Refactored desktop test and use custom-installation feature of casper.

=== modified file 'debian/control'
--- debian/control	2011-03-04 14:08:07 +0000
+++ debian/control	2011-06-22 08:17:23 +0000
@@ -42,6 +42,15 @@
  testing of Ubuntu Desktop ISO images in-conjunction with a
  Hudson continuous integration server.
 
+Package: ubuntu-kernel-iso-testing
+Architecture: i386 amd64
+Depends: ${misc:Depends}, ${python:Depends}, ubuntu-iso-testing-common
+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
 Architecture: i386 amd64
 Depends: ${misc:Depends}, ${python:Depends}, couchdb, curl, python-setuptools,

=== modified file 'debian/ubuntu-iso-testing-common.dirs'
--- debian/ubuntu-iso-testing-common.dirs	2011-01-12 20:47:12 +0000
+++ debian/ubuntu-iso-testing-common.dirs	2011-06-22 08:17:23 +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/dnsmasq.d
+var/lib/ubuntu-server-iso-testing/tftp
 var/log/ubuntu-server-iso-testing

=== modified file 'debian/ubuntu-iso-testing-common.install'
--- debian/ubuntu-iso-testing-common.install	2011-01-12 20:47:12 +0000
+++ debian/ubuntu-iso-testing-common.install	2011-06-22 08:17:23 +0000
@@ -7,9 +7,9 @@
 templates/libvirtd-iso-testing.conf etc/dnsmasq.d
 # Install replacement libvirt configuration for dnsmasq.d
 templates/dnsmasq-iso-testing.conf etc/dnsmasq.d
-# Install sudo configuration for usit
-templates/usit-dnsmasq etc/sudoers.d
 # Install couchdb configuration
 templates/iso-testing.ini etc/couchdb/local.d
 # Install rc.local to fix dnsmasq/libvirtd-bin conflict
 templates/rc.local etc
+# Install pxelinux.0 to shared location
+templates/pxelinux.0 usr/share/ubuntu-server-iso-testing/tftp

=== modified file 'debian/ubuntu-iso-testing-common.postinst'
--- debian/ubuntu-iso-testing-common.postinst	2011-02-01 17:57:43 +0000
+++ debian/ubuntu-iso-testing-common.postinst	2011-06-22 08:17:23 +0000
@@ -39,6 +39,14 @@
         # 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
+
+        # Setup TFTP root for testing
+        mkdir -p /var/lib/ubuntu-server-iso-testing/tftp/pxelinux.cfg || true
+        ln -s /usr/share/ubuntu-server-iso-testing/tftp/pxelinux.0 \
+            /var/lib/ubuntu-server-iso-testing/tftp/pxelinux.0 || true
+		# Fix permissions on tftp dir
+        chown -R usit:adm /var/lib/ubuntu-server-iso-testing/tftp || true
+
         # /var/run/ubuntu-server-iso-testing 
         chown -R usit:adm /var/log/ubuntu-server-iso-testing || true
         # change mode to 755 - exclude jobs and .ssh directories.
@@ -46,12 +54,9 @@
         # chmod -R 755 /var/run/ubuntu-server-iso-testing || true
         chmod 755 /var/log/ubuntu-server-iso-testing || true
 
-	      # Fix perms on /etc/sudoers.d/usit-dnsmasq so sudo does not break
-	      chmod 0440 /etc/sudoers.d/usit-dnsmasq || true
-
-	      # Kill any existing dnsmasq (from libvirt-bin)
+        # Kill any existing dnsmasq (from libvirt-bin)
         # Required due to conflict between libvirt and dnsmasq
-	      pkill dnsmasq || true
+	    pkill dnsmasq || true
 
 	      # Restart dnsmasq and couchdb to pickup new settings
         if [ -x /etc/init.d/dnsmasq ]; then

=== added file 'debian/ubuntu-kernel-iso-testing.dirs'
--- debian/ubuntu-kernel-iso-testing.dirs	1970-01-01 00:00:00 +0000
+++ debian/ubuntu-kernel-iso-testing.dirs	2011-06-22 08:17:23 +0000
@@ -0,0 +1,1 @@
+usr/share/ubuntu-server-iso-testing/templates.kernel

=== added file 'debian/ubuntu-kernel-iso-testing.install'
--- debian/ubuntu-kernel-iso-testing.install	1970-01-01 00:00:00 +0000
+++ debian/ubuntu-kernel-iso-testing.install	2011-06-22 08:17:23 +0000
@@ -0,0 +1,2 @@
+templates.kernel/* usr/share/ubuntu-server-iso-testing/templates.kernel
+

=== added file 'docs/README.dev'
--- docs/README.dev	1970-01-01 00:00:00 +0000
+++ docs/README.dev	2011-06-22 08:17:23 +0000
@@ -0,0 +1,214 @@
+.. vim: set ft=rst tw=79:
+
+Introduction
+============
+
+The purpose of this document is to outline the structure of the 
+ubuntu-server-iso-testing project to enable developers and testers to easily 
+develop new test cases and allow developers to submit new features to the 
+codebase.
+
+
+Directory Layout of Source Code
+===============================
+
+\*.py : codebase that downloads ISO's and executes the test cases
+
+templates/* : templates and test cases for Ubuntu Server ISO
+
+templates.desktop/* : templates and test cases for Ubuntu Desktop ISO
+
+templates.altenate/* : templates and test cases for Ubuntu Alternate ISO
+
+debian/* : contains the Debian/Ubuntu packaging for this 
+project.
+
+
+Codebase
+========
+
+download-latest-test-iso.py
+---------------------------
+
+This script Scans cdimages.ubuntu.com to determine which set of ISO images 
+constitute the latest published.  This script support multi-releases and 
+variants to allow the local ISO cache to be easily synced on demand.  The 
+code 'locks' to ensure that if multiple test runs are being execute from 
+Jenkins only one will download the ISO image
+
+run-test.py
+-----------
+
+This script actually executes the test cases; it completes the following steps
+prior to executing the actual testing:
+
+ * Initialises the jinja2 template environment using the templates(.*)
+   directory and the preseed directory (templates(.*)/preseeds-common).
+ * Creates the database to support the testing in the configured CouchDB 
+   instance if it does not already exist
+ * Extracts the kernel and initrd from the ISO image
+ * Generates the preseed configuration for the test case
+ * Injects the preseed configuration into the initrd
+ * Deploys the preseed to the local tftp server (dnsmasq)
+ * Injects the run_test script into the initrd
+ * TODO (jibel): Does something clever with casper for desktop.
+ * Re-compresses the initrd and deploys to local tftp server
+ * Deploys the kernel to the local tftp server
+ * Deploys pxelinux.0 to the local tftp server
+ * Creates and deploys the pxelinux configuration file to the local tftp 
+   server
+ * Pushes the test scripts into the CouchDB instance
+ * Generates and deploys the libvirt configuration including creating #
+   disks (qcow2)
+   * The configuration references the local ISO image on disk to support
+     the automated install
+ * Generates the dnsmasq tftp/dhcp configuration for the test case virtual
+   machine and deploys it to the local dnsmasq instance
+   * dnsmasq is restarted using sudo; this needs some attention as it is 
+     not multi test-instance safe.
+ * Starts the virtual machine using virsh
+
+The virtual machine is then built from the ISO image using the preseed; The
+virtual machine state is monitored every 30 seconds - at this point the 
+install log is also downloaded from the virtual machine (an apache instance
+is started early in the debian installer process - see the preseed config for
+details of this).
+
+When the virtual machine has powered off the test case is considered complete.
+The test will also timeout after a configurable time limit.
+
+The script then:
+
+ * Downloads all of the information stored in the CouchDB instance to the 
+   local file system
+ * Destroys the virtual machine configuration and deletes the disks
+ * Deletes the entry from the CouchDB instance
+ * Removes the configuration for the virtual machine from dnsmasq
+ * Deletes the items from the tftp server associated with the test case
+
+If the state of the test in the CouchDB instance was 'tested' i.e. the test script ran and completed in the virtual machine, the script returns exit code 0; otherwise exit code 1 is returned.
+
+
+Ubuntu Server Templates
+=======================
+
+Foreword
+--------
+
+Ideally these templates should be stored in a separate bzr branch; this
+would allow the test case templates to be changed outside of the codebase.
+
+At the moment any changes to the templates requires a re-publish of the
+ubuntu-server-iso-testing package in the testing PPA.
+
+OR
+
+we could setup a daily build recipe to automate this process - may work but
+might not be quick enough.
+
+Preseed Templating
+------------------
+
+The test framework uses Jinga2 (as used in Django) to generate test case
+preseeds; these are built from two template locations:
+
+templates/preseeds-common/base
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This is the base preseed configuration used by all test cases; it contains
+a number of extension points in the template to allow it to be specialised 
+by the individual test cases:
+
+ * partman_auto_method - allow configuration of the partitioning scheme for
+   the install; this is by default 'regular' but could be specialised to use
+   lvm or RAID configurations
+ * kernel_flavour - allows the kernel image to be specified - useful when
+   writing test cases for minimal virtual installs that use the -virtual
+   kernel
+ * anna_modules - TODO
+ * tasksel_first - defaults to 'Basic Ubuntu Server' - allows override in test
+   cases to support other task selection activities.
+ * pkgsel_first - by default installs the packages required to execute the test
+   case including subunit and some support libraries.
+ * d_i_answers - empty by default bu allows additional debian-installer answers
+   to be configured in the test cases
+ * preseed_extra - again empty by default but allows further specialisation in
+   test case
+
+There are also a number of template variables which are populated during
+generation:
+
+ * hostname - hostname of the virtual machine (normally a UUID)
+ * proxyurl - URL of proxy to use - the packaging installs apt-cacher-ng 
+   to allow local network caching of packages to improve performance
+ * test_case_url - this is the URL of the test case in the CouchDB instance; 
+   generated by run-test.py based on parameters and environment variable
+   configurations.
+
+templates/test_cases/*
+~~~~~~~~~~~~~~~~~~~~~~
+
+The directories in this location are the specific test cases; each test case
+contains:
+
+ * preseed : extends 'base' (see above) and adds specific preseed
+   specialisation to support the test case (normally a tasksel).
+ * test : a python unittest which is executed in the virtual machine
+   after it is installed; this should complete the tests required to 
+   validate that the install has worked correctly.
+
+Look in this directory for a list of current test cases and some examples.
+
+run_test
+--------
+
+This script is injected into the initrd image used to boot the installation 
+of the virtual machine.  Its normally installed to /usr/local/bin (see the base
+preseed configuration) and is executed once the virtual machine has booted for 
+the first time.
+
+It completed the following steps:
+
+ * Grabs the test script from the CouchDB instance (this is the 'test' file
+   from the test_case - see above).
+ * Executes the test script using subunit and subunit2junitxml
+ * Grabs the resuling output and stores it in the CouchDB instance
+
+The test is then marked as 'tested' in the CouchDB instance and the virtual
+machine is powered off which signals to the run-test.py script that testing
+has been completed.
+
+In theory this script could be specialised on a per test case basis - however that would require some minor changes in run-test.py in order to accomodate this
+requirement.
+
+THEORY: test states in couchdb could be used to control and multi-reboot test
+case in-conjunction with this script; each boot would detect the current phase
+and then execute specific test scripts - the results of each would be stored
+in the CouchDB instance.
+
+libvirt.xml
+-----------
+
+This template contains the libvirt configuration used to specify the virtual machine. It does
+some basic Jinja2 templating to plug in variables for the specific test case instance. It also
+accomodates the specification of mulitple virtual disks (could be used for RAID testing).
+
+dnsmasq.conf
+------------
+
+The template contains the dnsmasq configuration using to enable the tftp booting of the virtual
+machine from the dnsmsaq tftp server.  Again is used some basic Jinja2 templating to specify
+the variables associated with the specific test case instance.
+
+
+Ubuntu Desktop Templates
+========================
+
+TODO
+
+Ubuntu Alternate Templates
+==========================
+
+TODO
+
+

=== modified file 'download-latest-test-iso.py'
--- download-latest-test-iso.py	2011-04-05 14:17:18 +0000
+++ download-latest-test-iso.py	2011-06-22 08:17:23 +0000
@@ -39,9 +39,7 @@
 DEFAULT_ISOROOT = os.path.expanduser('~/isos')
 
 # URLS
-ALTERNATE_URL= 'http://cdimage.ubuntu.com/daily/'
-DESKTOP_URL='http://cdimage.ubuntu.com/daily-live/'
-SERVER_URL='http://cdimage.ubuntu.com/ubuntu-server/daily/' 
+BASE_URL="http://cdimage.ubuntu.com";
 
 # List of 'all' architectures
 ALL_ARCHS =[ 'i386',  'amd64']
@@ -104,6 +102,8 @@
                                 help="flavor of Ubuntu to download (default=%s)" % DEFAULT_FLAVOR)
 parser.add_option('-n', '--no-act', default=False, action='store_true',
                   dest='no_act', help='compute everything but don\'t actually download')
+parser.add_option('-u', '--url', dest="base_url", default=BASE_URL, 
+                                help="Base URL for cdimage retrieval website (default=%s)" % BASE_URL)
 
 (options, args) = parser.parse_args()
 
@@ -112,16 +112,21 @@
 else:
     logging.basicConfig(level=logging.INFO)
 
+# Setup URLS
+ALTERNATE_URL= '%s/daily/' % options.base_url
+DESKTOP_URL='%s/daily-live/' % options.base_url
+SERVER_URL='%s/ubuntu-server/daily/' % options.base_url
+
 # Setup Parser to parse CDIMAGE pages.
 parser = ISOHTMLParser()
-l_url = SERVER_URL 
+l_url = SERVER_URL
 if options.variant == 'server':
     l_url= SERVER_URL
 elif options.variant == 'desktop':
     l_url = DESKTOP_URL
 elif options.variant == 'alternate':
     l_url = ALTERNATE_URL
-    
+
 # Check options for architectures
 l_archs = []
 if options.arch == 'all':

=== modified file 'run-test.py'
--- run-test.py	2011-06-10 09:54:52 +0000
+++ run-test.py	2011-06-22 08:17:23 +0000
@@ -227,11 +227,11 @@
 db.put_attachment(test_case_doc, open(preseed_file), "preseed")
 
 # Create location for TFTP setup 
-test_tftp_dir = os.path.join(TFTP_DIR,test_uuid)
-os.makedirs(test_tftp_dir)
+# test_tftp_dir = os.path.join(TFTP_DIR,test_uuid)
+# os.makedirs(test_tftp_dir)
 
 logging.debug("Copying preseed to tftp root")
-shutil.copy(preseed_file,test_tftp_dir)
+shutil.copy(preseed_file,os.path.join(TFTP_DIR,'preseed.%s' % test_uuid))
 
 logging.info("Copying run_test")
 # Put run_test in the initrd so that the installer can copy it
@@ -274,7 +274,7 @@
                   'pxe/initrd')
 
 logging.debug("Copying initrd to tftp root")
-shutil.copy(t_initrd,os.path.join(test_tftp_dir,'initrd'))
+shutil.copy(t_initrd,os.path.join(TFTP_DIR,'initrd.%s' % test_uuid))
 
 logging.debug("Attaching kernel")
 test_case_doc = db[test_uuid]
@@ -283,28 +283,41 @@
                   'pxe/kernel')
 
 logging.debug("Copying kernel to tftp root")
-shutil.copy(kernel,os.path.join(test_tftp_dir,'kernel'))
-
-logging.debug("Attaching pxelinux.0")
-test_case_doc = db[test_uuid]
-db.put_attachment(test_case_doc,
-                  open(os.path.join(TMPL_DIR, 'pxelinux.0')),
-                  'pxe/pxelinux.0')
-
-logging.debug("Copying pxelinux.0 to tftp root")
-shutil.copy(os.path.join(TMPL_DIR, 'pxelinux.0'),test_tftp_dir)
+shutil.copy(kernel,os.path.join(TFTP_DIR,'kernel.%s' % test_uuid))
+
+# All tests now use flat structure - use one pxelinux.0
+#logging.debug("Attaching pxelinux.0")
+#test_case_doc = db[test_uuid]
+#db.put_attachment(test_case_doc,
+#                  open(os.path.join(TMPL_DIR, 'pxelinux.0')),
+#                  'pxe/pxelinux.0')
+#
+#logging.debug("Copying pxelinux.0 to tftp root")
+#shutil.copy(os.path.join(TMPL_DIR, 'pxelinux.0'),test_tftp_dir)
+# Generate pxelinux configuration file for test cashe
+
+logging.debug("Copying pxelinux config to tftp root")
+tmpl = templates.get_template('pxelinuxcfg.install')
+ctxt = { 'mac': mac_address,
+         'uuid': test_uuid
+       }
+logging.debug("Context: %s" % (ctxt))
+pxelinux_cfg_file = os.path.join(TFTP_DIR,'pxelinux.cfg',
+                                 '01-%s' % mac_address.replace(':','-'))
+tmpl.stream(ctxt).dump(pxelinux_cfg_file)
 
 logging.debug("Attaching pxelinux config")
 test_case_doc = db[test_uuid]
 db.put_attachment(test_case_doc,
-                  open(os.path.join(TMPL_DIR, 'pxelinuxcfg.install')),
-                  "pxe/pxelinux.cfg/%s" % (test_uuid))
+                  open(pxelinux_cfg_file),
+                  "pxe/pxelinux.cfg/%s" % mac_address)
 
-logging.debug("Copying pxelinux config to tftp root")
-pxelinux_cfg = os.path.join(test_tftp_dir,'pxelinux.cfg')
-os.makedirs(pxelinux_cfg)
-shutil.copy(os.path.join(TMPL_DIR, 'pxelinuxcfg.install'),
-            os.path.join(pxelinux_cfg,'default'))
+#logging.debug("Copying pxelinux config to tftp root")
+#pxelinux_cfg = os.path.join(test_tftp_dir,'pxelinux.cfg')
+#os.makedirs(pxelinux_cfg)
+# Template PXE configuration 
+#shutil.copy(os.path.join(TMPL_DIR, 'pxelinuxcfg.install'),
+#            os.path.join(pxelinux_cfg,mac_address))
 
 logging.debug("Adding test script to test case document")
 t_script = os.path.join(TEST_CASE_DIR, t_preseed, 'test')
@@ -381,22 +394,22 @@
 test_case_doc = db[test['_id']]
 db.put_attachment(test_case_doc, open(libvirt_file), "libvirt.xml")
 
-logging.debug("Updating dnsmasq configuration for %s" % (test['_id']))
-tmpl = templates.get_template('dnsmasq.conf')
-ctxt = { 'mac': test['mac'],
-         'test_tracker': TEST_TRACKER,
-         'test_db': TEST_DATABASE,
-         'tftp_host' : TFTP_HOST,
-         'uuid': test['_id'],
-       }
-logging.debug("Context: %s" % (ctxt))
-dnsmasq_conf_file = os.path.join(DNSMASQ_DIR, "%s.conf" % (test['_id']))
-tmpl.stream(ctxt).dump(dnsmasq_conf_file)
-cmd = [ "sudo", "/usr/sbin/service", "dnsmasq", "restart"]
-logging.debug("Cmd: %s" % (cmd))
-subprocess.check_call(cmd)
-test_case_doc = db[test['_id']]
-db.put_attachment(test_case_doc, open(dnsmasq_conf_file), "dnsmasq.conf")
+#logging.debug("Updating dnsmasq configuration for %s" % (test['_id']))
+#tmpl = templates.get_template('dnsmasq.conf')
+#ctxt = { 'mac': test['mac'],
+#         'test_tracker': TEST_TRACKER,
+#         'test_db': TEST_DATABASE,
+#         'tftp_host' : TFTP_HOST,
+#         'uuid': test['_id'],
+#       }
+#logging.debug("Context: %s" % (ctxt))
+#dnsmasq_conf_file = os.path.join(DNSMASQ_DIR, "%s.conf" % (test['_id']))
+#tmpl.stream(ctxt).dump(dnsmasq_conf_file)
+#cmd = [ "sudo", "/usr/bin/pkill", "-HUP", "dnsmasq"]
+#logging.debug("Cmd: %s" % (cmd))
+#subprocess.check_call(cmd)
+#test_case_doc = db[test['_id']]
+#db.put_attachment(test_case_doc, open(dnsmasq_conf_file), "dnsmasq.conf")
 
 test = db[test['_id']]
 test['states']['configured'] = datetime.datetime.utcnow().isoformat()
@@ -417,7 +430,6 @@
 l_macAddress = None
 l_ipAddress = None
 
-
 # OK, I agree that the 'def's below look weird here, but ah well
 
 def get_ipAddress(domain, macAddress):
@@ -579,14 +591,20 @@
 shutil.rmtree(os.path.join(TEST_DIR,  test['_id']))
 
 # Remove TFTP files - no longer required
-shutil.rmtree(test_tftp_dir)
+#shutil.rmtree(test_tftp_dir)
+# TODO remove pxelinux configuration from TFTP_DIR
+os.remove(os.path.join(TFTP_DIR,'kernel.%s' % test_uuid))
+os.remove(os.path.join(TFTP_DIR,'initrd.%s' % test_uuid))
+os.remove(os.path.join(TFTP_DIR,'preseed.%s' % test_uuid))
+os.remove(os.path.join(TFTP_DIR,'pxelinux.cfg',
+                       '01-%s' % mac_address.replace(':','-')))
     
 # Remove dnsmasq configuration and restart dnsmasq
-logging.debug("Removing dnsmasq configuration for %s" % (test['_id']))
-os.remove(dnsmasq_conf_file )
-cmd = [ "sudo", "/usr/sbin/service", "dnsmasq", "restart"]
-logging.debug("Cmd: %s" % (cmd))
-subprocess.check_call(cmd)
+#logging.debug("Removing dnsmasq configuration for %s" % (test['_id']))
+#os.remove(dnsmasq_conf_file )
+#cmd = [ "sudo", "/usr/bin/pkill", "-HUP", "dnsmasq"]
+#logging.debug("Cmd: %s" % (cmd))
+#subprocess.check_call(cmd)
 
 # Running under Hudson?
 if HUDSON_URL:

=== modified file 'templates.alternate/pxelinuxcfg.install'
--- templates.alternate/pxelinuxcfg.install	2011-03-04 13:50:04 +0000
+++ templates.alternate/pxelinuxcfg.install	2011-06-22 08:17:23 +0000
@@ -23,7 +23,7 @@
 default install
 
 label install
-kernel kernel
-initrd initrd
+kernel kernel.{{ uuid }}
+initrd initrd.{{ uuid }}
 append file=/preseed DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us
 

=== modified file 'templates.desktop/pxelinuxcfg.install'
--- templates.desktop/pxelinuxcfg.install	2011-06-10 09:54:52 +0000
+++ templates.desktop/pxelinuxcfg.install	2011-06-22 08:17:23 +0000
@@ -22,7 +22,7 @@
 default install
 
 label install
-kernel kernel
-initrd initrd
+kernel kernel.{{ uuid }}
+initrd initrd.{{ uuid }}
 append boot=casper DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us keyboard-configuration/layoutcode=fr keyboard-configuration/variantcode=oss noprompt automatic-ubiquity
 

=== added directory 'templates.kernel'
=== added file 'templates.kernel/config.xml'
--- templates.kernel/config.xml	1970-01-01 00:00:00 +0000
+++ templates.kernel/config.xml	2011-06-22 08:17:23 +0000
@@ -0,0 +1,93 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- 
+  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/>.
+-->  
+<project>
+  <actions/>
+  <description>Hudson wrapper to execute individual ISO build test.</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>TEST_CASE</name>
+          <description>UUID of test case to execute</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>TEST_TRACKER</name>
+          <description>Location of CouchDB to store configuration and test results.</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>ISO_DIR</name>
+          <description>Location to store ISO images locally.</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>RELEASE</name>
+          <description>Release to download from image archive (i.e. maverick, lucid etc).</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>VARIANT</name>
+          <description>Variant to download from image archive (i.e server).</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>BUILD_VERSION</name>
+          <description>Build version to download from image archive (i.e current, 20100923).</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+    <hudson.plugins.disk__usage.DiskUsageProperty/>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <assignedNode>!master</assignedNode>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers class="vector"/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+   <hudson.tasks.Shell>
+      <command>#!/bin/bash
+
+${HOME}/reference/iso-testing/download-latest-test-iso.py --release=${RELEASE} --variant=${VARIANT} --isoroot=${ISO_DIR}</command>
+    </hudson.tasks.Shell>
+    <hudson.tasks.Shell>
+      <command>#/bin/bash
+
+${HOME}/reference/iso-testing/configure_and_run_test_by_uuid.py -d ${TEST_CASE}</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers>
+    <hudson.tasks.ArtifactArchiver>
+      <artifacts>**/*</artifacts>
+      <latestOnly>false</latestOnly>
+    </hudson.tasks.ArtifactArchiver>
+    <hudson.tasks.junit.JUnitResultArchiver>
+      <testResults>**/test-results/*.xml</testResults>
+      <keepLongStdio>false</keepLongStdio>
+      <testDataPublishers/>
+    </hudson.tasks.junit.JUnitResultArchiver>
+  </publishers>
+  <buildWrappers/>
+</project>

=== added file 'templates.kernel/dnsmasq.conf'
--- templates.kernel/dnsmasq.conf	1970-01-01 00:00:00 +0000
+++ templates.kernel/dnsmasq.conf	2011-06-22 08:17:23 +0000
@@ -0,0 +1,22 @@
+# 
+# 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/>.
+# 
+
+dhcp-host={{ mac }},net:{{ mac }}
+dhcp-boot=net:{{ mac }},{{ uuid }}/pxelinux.0,{{ tftp_host }}

=== added file 'templates.kernel/libvirt.xml'
--- templates.kernel/libvirt.xml	1970-01-01 00:00:00 +0000
+++ templates.kernel/libvirt.xml	2011-06-22 08:17:23 +0000
@@ -0,0 +1,56 @@
+<!-- 
+  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/>.
+-->  
+<domain type='kvm'>
+	<name>{{ name }}</name>
+	<uuid>{{ uuid }}</uuid>
+	<memory>450000</memory>
+	<vcpu>1</vcpu>
+	<features>
+		<acpi/>
+	</features>
+  	<os>
+		<type>hvm</type>
+		<boot dev='hd' />
+		<boot dev='network' />
+	</os>
+	<clock offset='utc'/>
+	<on_poweroff>destroy</on_poweroff>
+	<on_reboot>restart</on_reboot>
+	<on_crash>destroy</on_crash>
+	<devices>
+{% for  disk in disks  %}
+		<disk type='file' device='disk'>
+      			<driver name='qemu' type='qcow2'/>
+			<source file='{{ disk.source }}'/>
+			<target dev='{{ disk.target }}' bus='{{ disk.bus }}'/>
+		</disk>
+{% endfor %}
+        	<disk type='file' device='cdrom'>
+			<source file='{{ iso_file }}'/>
+			<target dev='hdc'/><readonly/>
+		</disk>
+		<interface type='network'>
+		        <mac address='{{ mac }}'/>
+      			<source network='default' />
+			<model type='virtio'/>
+       		</interface>
+      		<graphics type='vnc' listen='0.0.0.0'/>
+        </devices>
+</domain>

=== added file 'templates.kernel/ltp2junitxml.py'
--- templates.kernel/ltp2junitxml.py	1970-01-01 00:00:00 +0000
+++ templates.kernel/ltp2junitxml.py	2011-06-22 08:17:23 +0000
@@ -0,0 +1,68 @@
+#!/usr/bin/python
+
+import optparse
+import logging
+import os
+import re
+
+JUNIT_HEADER='<testsuite errors="0" failures="%s" name="autotest" tests="%s" time="0">'
+JUNIT_FOOTER='</testsuite>'
+JUNIT_TEST_ENTRY='<testcase classname="%s" name="%s" time="0"/>'
+JUNIT_TEST_FAILED_ENTRY='<testcase classname="%s" name="%s" time="0">'
+JUNIT_TEST_FAILED_ENTRY_FOOTER='</testcase>'
+JUNIT_FAILURE_START='<failure><![CDATA['
+JUNIT_FAILURE_END=']]></failure>'
+PASS_RE='(.*)    (\d)  TPASS  :  (.*)'
+FAIL_RE='(.*)    (\d)  TFAIL  :  (.*)'
+
+usage="usage: %prog [options] preseed1"
+parser = optparse.OptionParser(usage=usage)
+parser.add_option("-d", "--debug", dest="debug", action="store_true",  default=False,
+                  help="enable debugging")
+(options, args) = parser.parse_args()
+if options.debug:
+    logging.basicConfig(level=logging.DEBUG)
+else:
+    logging.basicConfig(level=logging.INFO)
+
+f = open(args[0])
+
+parent = False
+in_test_case = False
+start_timestamp = None
+test_name = ""
+test_status = ""
+test_count = 0
+test_failures_count = 0
+error = ""
+
+tests = []
+
+contents = f.read()
+
+#print contents
+
+passes = re.findall(PASS_RE,contents)
+fails = re.findall(FAIL_RE,contents)
+
+print JUNIT_HEADER % (len(fails),len(fails)+len(passes))
+
+for x in passes:
+	name = x[0].strip()
+	iteration = x[1]
+	print JUNIT_TEST_ENTRY % (name,name+iteration)
+
+for x in fails:
+	name = x[0].strip()
+	iteration = x[1]
+	print JUNIT_TEST_FAILED_ENTRY % (name,name+iteration)
+	print JUNIT_FAILURE_START
+	print x[2]
+	print JUNIT_FAILURE_END
+	print JUNIT_TEST_FAILED_ENTRY_FOOTER
+
+print JUNIT_FOOTER
+	
+
+
+		

=== added file 'templates.kernel/preseed-config.xml'
--- templates.kernel/preseed-config.xml	1970-01-01 00:00:00 +0000
+++ templates.kernel/preseed-config.xml	2011-06-22 08:17:23 +0000
@@ -0,0 +1,92 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- 
+  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/>.
+-->  
+<project>
+  <actions/>
+  <description>Automated {{ release }} {{ arch }} {{ variant }} ISO test for {{ preseed }}</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>RELEASE</name>
+          <description>Release name of ISO image to execute test against</description>
+          <defaultValue>{{ release }}</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>VARIANT</name>
+          <description>Variant of ISO image to execute test against</description>
+          <defaultValue>{{ variant }}</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>ARCH</name>
+          <description>Architecture of ISO image to execute test against</description>
+          <defaultValue>{{ arch }}</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>PRESEED</name>
+          <description>Name of test preseed to execute</description>
+          <defaultValue>{{ preseed }}</defaultValue>
+        </hudson.model.StringParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <assignedNode>virtual-host&amp;&amp;{{ arch }}</assignedNode>
+  <canRoam>false</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers class="vector">
+    <com.redfin.hudson.UrlChangeTrigger>
+      <spec></spec>
+      <url>http://cdimage.ubuntu.com/ubuntu-server/daily/current/SHA256SUMS</url>
+    </com.redfin.hudson.UrlChangeTrigger>
+  </triggers>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>#!/bin/bash
+download-latest-test-iso  --release=${RELEASE} --variant=${VARIANT} --arch=${ARCH}
+</command>
+    </hudson.tasks.Shell>
+    <hudson.tasks.Shell>
+      <command>#!/bin/bash
+# Purge any existing data in the workspace
+rm -Rf *
+# Execute the test
+run-test --release=${RELEASE} --variant=${VARIANT} --arch=${ARCH} ${PRESEED}
+# Compress the install log file
+find . -name "d-i-syslog.log" -exec gzip {} \;
+</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers>
+    <hudson.tasks.ArtifactArchiver>
+      <artifacts>**/*</artifacts>
+      <latestOnly>false</latestOnly>
+    </hudson.tasks.ArtifactArchiver>
+    <hudson.tasks.junit.JUnitResultArchiver>
+      <testResults>**/test-results/*.xml</testResults>
+      <keepLongStdio>false</keepLongStdio>
+      <testDataPublishers/>
+    </hudson.tasks.junit.JUnitResultArchiver>
+  </publishers>
+  <buildWrappers/>
+</project>

=== added directory 'templates.kernel/preseeds-common'
=== added file 'templates.kernel/preseeds-common/base'
--- templates.kernel/preseeds-common/base	1970-01-01 00:00:00 +0000
+++ templates.kernel/preseeds-common/base	2011-06-22 08:17:23 +0000
@@ -0,0 +1,312 @@
+# 
+# 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/>.
+# 
+
+### Localization
+# Locale sets language and country.
+d-i debian-installer/locale string en_CA.UTF-8
+
+# Keyboard selection.
+# Disable automatic (interactive) keymap detection.
+d-i console-setup/ask_detect boolean false
+#d-i console-setup/modelcode string pc105
+d-i console-setup/layoutcode string ca
+# To select a variant of the selected layout (if you leave this out, the
+# basic form of the layout will be used):
+#d-i console-setup/variantcode string dvorak
+
+# start the HTTP server early, so that we can grab the d-i log
+# # will be executed after network initialisation is completed.
+d-i preseed/early_command string httpd
+
+### Network configuration
+# netcfg will choose an interface that has link if possible. This makes it
+# skip displaying a list if there is more than one interface.
+d-i netcfg/choose_interface select auto
+
+# To pick a particular interface instead:
+#d-i netcfg/choose_interface select eth1
+
+# If you have a slow dhcp server and the installer times out waiting for
+# it, this might be useful.
+d-i netcfg/dhcp_timeout string 180
+
+# If you prefer to configure the network manually, uncomment this line and
+# the static network configuration below.
+#d-i netcfg/disable_dhcp boolean true
+
+# If you want the preconfiguration file to work on systems both with and
+# without a dhcp server, uncomment these lines and the static network
+# configuration below.
+#d-i netcfg/dhcp_failed note
+#d-i netcfg/dhcp_options select Configure network manually
+
+# Static network configuration.
+#d-i netcfg/get_nameservers string 192.168.1.1
+#d-i netcfg/get_ipaddress string 192.168.1.42
+#d-i netcfg/get_netmask string 255.255.255.0
+#d-i netcfg/get_gateway string 192.168.1.1
+#d-i netcfg/confirm_static boolean true
+
+# Any hostname and domain names assigned from dhcp take precedence over
+# values set here. However, setting the values still prevents the questions
+# from being shown, even if values come from dhcp.
+d-i netcfg/get_hostname string {{ hostname }}
+d-i netcfg/get_domain string unassigned-domain
+
+# Disable that annoying WEP key dialog.
+d-i netcfg/wireless_wep string
+# The wacky dhcp hostname that some ISPs use as a password of sorts.
+#d-i netcfg/dhcp_hostname string radish
+
+
+### Mirror settings
+#d-i mirror/country string enter information manually
+#d-i mirror/http/hostname string mirror:3142
+#d-i mirror/http/directory string /ubuntu
+d-i mirror/http/proxy string  {{ proxyurl }}
+
+# Suite to install.
+#d-i mirror/suite string feisty
+# Suite to use for loading installer components (optional).
+#d-i mirror/udeb/suite string feisty
+
+### Partitioning
+# If the system has free space you can choose to only partition that space.
+# Note: this must be preseeded with a localized (translated) value.
+#d-i partman-auto/init_automatically_partition \
+#      select Use the largest continuous free space
+
+# Alternatively, you can specify a disk to partition. The device name must
+# be given in traditional non-devfs format.
+# For example, to use the first SCSI hard disk:
+d-i partman-auto/disk string /dev/vda
+{% block partman_auto_method %}
+d-i partman-auto/method string regular
+{% endblock %}
+
+# If one of the disks that are going to be automatically partitioned
+# contains an old LVM configuration, the user will normally receive a
+# warning. This can be preseeded away...
+d-i partman-lvm/device_remove_lvm boolean true
+# And the same goes for the confirmation to write the lvm partitions.
+d-i partman-lvm/confirm boolean true
+
+# You can choose from any of the predefined partitioning recipes.
+# Note: this must be preseeded with a localized (translated) value.
+d-i partman-auto/choose_recipe 		select All files in one partition (recommended for new users)
+#d-i partman-auto/choose_recipe \
+#       select Separate /home partition
+#d-i partman-auto/choose_recipe \
+#       select Separate /home, /usr, /var, and /tmp partitions
+
+# Or provide a recipe of your own...
+# The recipe format is documented in the file devel/partman-auto-recipe.txt.
+# If you have a way to get a recipe file into the d-i environment, you can
+# just point at it.
+#d-i partman-auto/expert_recipe_file string /hd-media/recipe
+
+# This makes partman automatically partition without confirmation.
+d-i partman-partitioning/choose_label string msdos
+d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition 		select Finish partitioning and write changes to disk
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+d-i partman-lvm/confirm_nooverwrite boolean true
+
+### Clock and time zone setup
+# Controls whether or not the hardware clock is set to UTC.
+d-i clock-setup/utc boolean true
+
+# Only ask the UTC question if there are other operating systems installed.
+d-i clock-setup/utc-auto boolean true
+
+# You may set this to any valid setting for $TZ; see the contents of
+# /usr/share/zoneinfo/ for valid values.
+d-i time/zone string US/Eastern
+
+
+### Apt setup
+# You can choose to install restricted and universe software, or to install
+# software from the backports repository.
+#d-i apt-setup/restricted boolean true
+#d-i apt-setup/universe boolean true
+#d-i apt-setup/backports boolean true
+# Uncomment this to avoid adding security sources, or
+# add a hostname to use a different server than security.ubuntu.com.
+d-i apt-setup/security_host string
+
+# Additional repositories, local[0-9] available
+#d-i apt-setup/local0/repository string http://server/localrep/ ./
+#d-i apt-setup/local0/comment string Comment
+# Enable deb-src lines
+#d-i apt-setup/local0/source boolean true
+# URL to the public key of the local repository
+#d-i apt-setup/local0/key string http://server/localrep/key
+
+
+### Account setup
+# Skip creation of a root account (normal user account will be able to
+# use sudo). The default is false; preseed this to true if you want to set
+# a root password.
+#d-i passwd/root-login boolean false
+# Alternatively, to skip creation of a normal user account.
+#d-i passwd/make-user boolean false
+
+# Root password, either in clear text
+#d-i passwd/root-password password r00tme
+#d-i passwd/root-password-again password r00tme
+# or encrypted using an MD5 hash.
+#d-i passwd/root-password-crypted password [MD5 hash]
+
+# To create a normal user account.
+d-i passwd/user-fullname string Ubuntu
+d-i passwd/username string ubuntu
+# Normal user's password, either in clear text
+d-i passwd/user-password password !ubuntu123
+d-i passwd/user-password-again password !ubuntu123
+
+# No boot splash screen.
+d-i	debian-installer/splash	boolean false
+
+### Base system installation
+# Select the initramfs generator used to generate the initrd for 2.6 kernels.
+#d-i base-installer/kernel/linux/initramfs-generators string yaird
+
+# Install the different kernel flavor.
+{% block kernel_flavor %}
+d-i	base-installer/kernel/override-image	string linux-generic-pae
+{% endblock %}
+
+{% block anna_modules %}
+{% endblock %}
+
+### Boot loader installation
+# Grub is the default boot loader (for x86). If you want lilo installed
+# instead, uncomment this:
+#d-i grub-installer/skip boolean true
+
+# This is fairly safe to set, it makes grub install automatically to the MBR
+# if no other operating system is detected on the machine.
+d-i grub-installer/only_debian boolean true
+
+# This one makes grub-installer install to the MBR if if finds some other OS
+# too, which is less safe as it might not be able to boot that other OS.
+d-i grub-installer/with_other_os boolean true
+
+# Alternatively, if you want to install to a location other than the mbr,
+# uncomment and edit these lines:
+#d-i grub-installer/bootdev  string (hd0,0)
+#d-i grub-installer/only_debian boolean false
+#d-i grub-installer/with_other_os boolean false
+
+# Wait for two seconds in grub
+d-i	grub-installer/timeout	string 2
+
+### Package selection
+
+{% block tasksel_first %}
+tasksel tasksel/first multiselect Basic Ubuntu server
+{% endblock %}
+
+{% block pkgsel_first %}
+d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml
+d-i pkgsel/update-policy select No automatic updates
+{% endblock %}
+
+{% block d_i_answers %}
+# debian-installer preseeded answers should be in this block
+{% endblock %}
+
+# Only install basic language packs. Let tasksel ask about tasks.
+d-i pkgsel/language-pack-patterns string
+# No language support packages.
+d-i pkgsel/install-language-support boolean false
+
+# Some versions of the installer can report back on what software you have
+# installed, and what software you use. The default is not to report back,
+# but sending reports helps the project determine what software is most
+# popular and include it on CDs.
+#popularity-contest popularity-contest/participate boolean false
+
+### Finishing up the first stage install
+# Avoid that last message about the install being complete.
+d-i finish-install/reboot_in_progress note
+
+# This will prevent the installer from ejecting the CD during the reboot,
+# which is useful in some situations.
+#d-i cdrom-detect/eject boolean false
+
+
+### X configuration
+# X can detect the right driver for some cards, but if you're preseeding,
+# you override whatever it chooses. Still, vesa will work most places.
+#xserver-xorg xserver-xorg/config/device/driver select vesa
+
+# A caveat with mouse autodetection is that if it fails, X will retry it
+# over and over. So if it's preseeded to be done, there is a possibility of
+# an infinite loop if the mouse is not autodetected.
+#xserver-xorg xserver-xorg/autodetect_mouse boolean true
+
+# Monitor autodetection is recommended.
+#xserver-xorg xserver-xorg/autodetect_monitor boolean true
+# Uncomment if you have an LCD display.
+#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
+# X has three configuration paths for the monitor. Here's how to preseed
+# the "medium" path, which is always available. The "simple" path may not
+# be available, and the "advanced" path asks too many questions.
+#xserver-xorg xserver-xorg/config/monitor/selection-method \
+#       select medium
+#xserver-xorg xserver-xorg/config/monitor/mode-list \
+#       select 800x600 @ 60 Hz
+
+
+### Preseeding other packages
+# Depending on what software you choose to install, or if things go wrong
+# during the installation process, it's possible that other questions may
+# be asked. You can preseed those too, of course. To get a list of every
+# possible question that could be asked during an install, do an
+# installation, and then run these commands:
+#   debconf-get-selections --installer > file
+#   debconf-get-selections >> file
+
+
+
+### Shell commands
+# d-i preseeding is inherently not secure. Nothing in the installer checks
+# for attempts at buffer overflows or other exploits of the values of a
+# preconfiguration file like this one. Only use preconfiguration files from
+# trusted locations! To drive that home, and because it's generally useful,
+# here's a way to run any shell command you'd like inside the installer,
+# automatically.
+
+# This first command is run as early as possible, just after
+# preseeding is read.
+#d-i preseed/early_command string /cdrom/early_command
+
+# This command is run just before the install finishes, but when there is
+# still a usable /target directory. You can chroot to /target and use it
+# directly, or use the apt-install and in-target commands to easily install
+# packages and run commands in the target system.
+#d-i preseed/late_command string echo "send host-name \"<hostname>\";" >> /target/etc/dhcp3/dhclient.conf;
+
+d-i preseed/late_command string cp /run_test /target/usr/local/bin/ ; chroot /target sh -c "sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers; chmod 0755 /usr/local/bin/run_test; echo '/usr/local/bin/run_test --syslog --sleep 30 {{ test_case_url }}' > /etc/rc.local"
+
+{% block preseed_extra %}
+{% endblock %}

=== added file 'templates.kernel/pxelinux.0'
Binary files templates.kernel/pxelinux.0	1970-01-01 00:00:00 +0000 and templates.kernel/pxelinux.0	2011-06-22 08:17:23 +0000 differ
=== added file 'templates.kernel/pxelinuxcfg.install'
--- templates.kernel/pxelinuxcfg.install	1970-01-01 00:00:00 +0000
+++ templates.kernel/pxelinuxcfg.install	2011-06-22 08:17:23 +0000
@@ -0,0 +1,29 @@
+# 
+# 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/>.
+# 
+
+prompt 0
+timeout 10
+default install
+
+label install
+kernel kernel.{{ uuid }}
+initrd initrd.{{ uuid }}
+append file=/preseed DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us
+

=== added file 'templates.kernel/run_test'
--- templates.kernel/run_test	1970-01-01 00:00:00 +0000
+++ templates.kernel/run_test	2011-06-22 08:17:23 +0000
@@ -0,0 +1,170 @@
+#!/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 datetime
+import json
+import logging, logging.handlers
+import optparse
+import os, os.path
+import subprocess
+import sys
+import time
+import urllib
+import urlparse
+
+import couchdb
+
+parser = optparse.OptionParser()
+parser.add_option("", "--sleep", type="float",
+                  help="Sleep before starting (in seconds)")
+parser.add_option("", "--syslog",
+                  dest="syslog", default=False, action="store_true",
+                  help="Log to syslog")
+parser.add_option("", "--debug",
+                  dest="debug", default=False, action="store_true",
+                  help="Turn debugging on")
+parser.add_option("", "--test-dir",
+                  default="/var/lib/tests",
+                  help="Directory to store tests data")
+(options, args) = parser.parse_args()
+
+LOG_LEVEL = logging.INFO
+if options.debug:
+    LOG_LEVEL = logging.DEBUG
+
+# set up logging to file by default
+TEST_DIR = options.test_dir
+if not os.path.exists(TEST_DIR):
+    os.makedirs(TEST_DIR)
+
+logger = logging.getLogger(os.path.basename(sys.argv[0]))
+logger.setLevel(LOG_LEVEL)
+file_hdlr = logging.FileHandler(mode='a',
+                                filename=os.path.join(options.test_dir,
+                                                      'run.log'))
+fmt = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
+file_hdlr.setFormatter(fmt)
+logger.addHandler(file_hdlr)
+if options.debug:
+    logger.debug("Adding console logger")
+    console_hdlr = logging.StreamHandler()
+    fmt = logging.Formatter('%(levelname)s %(message)s')
+    console_hdlr.setFormatter(fmt)
+    logger.addHandler(console_hdlr)
+if options.syslog:
+    logger.debug("Adding syslog logger")
+    syslog_hdlr = logging.handlers.SysLogHandler(address='/dev/log',
+                          facility=logging.handlers.SysLogHandler.LOG_DAEMON)
+    fmt = logging.Formatter('%(name)s %(levelname)s %(message)s')
+    syslog_hdlr.setFormatter(fmt)
+    logger.addHandler(syslog_hdlr)
+
+logger.debug("Options: %s" % (options))
+logger.debug("Args: %s" % (args))
+
+if options.sleep:
+    logger.info("Sleeping %s" % (options.sleep))
+    time.sleep(options.sleep)
+
+logger.info("Starting test run")
+test_docname = args[0]
+logger.debug("Getting test script from %s" % (test_docname))
+(s, n, p, q, f) = urlparse.urlsplit(test_docname)
+server_url = "%s://%s/" % (s, n)
+logger.debug("Testracker server: %s" % (server_url))
+server = couchdb.client.Server(server_url)
+db_name = p.split('/')[1]
+logger.debug("Testracker db: %s" % (db_name))
+db = server[db_name]
+test_id = p.split('/')[2]
+logger.debug("Test id: %s" % (test_id))
+test_scripts = filter(lambda n: n.startswith('tests/'),
+                      db[test_id]['_attachments'].keys())
+logger.debug("Test scripts: %s" % (test_scripts))
+test_doc = db[test_id]
+test_doc['results'] = {}
+if test_doc['states'].has_key('testing'):
+    logging.warning('Test already run. Aborting.')
+    sys.exit(0)
+test_doc['states']['testing'] = datetime.datetime.utcnow().isoformat()
+db[test_id] = test_doc
+l_cwd = os.getcwd()
+
+for t in test_scripts:
+    logger.info("Running test %s" % (t))
+    report = { "started": datetime.datetime.utcnow().isoformat() }
+    test_doc = db[test_id]
+    test_doc['results'][os.path.basename(t)] = report
+    db[test_id] = test_doc
+    t_url = "%s/%s" % (test_docname, t)
+    logger.debug("Retrieving test script %s" % (t_url))
+    t_dir = os.path.join(TEST_DIR, t)
+    if not os.path.exists(t_dir):
+        os.makedirs(t_dir)
+    filename = os.path.join(t_dir, 'test.py')
+    (filename, headers) = urllib.urlretrieve(t_url, filename=filename)
+    os.chmod(filename, 0755)
+
+    logger.debug("Creating test stdout and stderr files")
+    test_stdout_fh = open(os.path.join(t_dir, "log.out"), mode='w+')
+    test_stderr_fh = open(os.path.join(t_dir, "log.err"), mode='w+')
+
+    logger.debug("Running script")
+    os.chdir(t_dir)
+    cmd = ['python','-m','subunit.run','test'] 
+    logger.debug("Cmd: %s" % (cmd))
+
+    testrun = subprocess.Popen(cmd,stdout=subprocess.PIPE,
+				   stderr=test_stderr_fh)
+   
+    cmd2 = ['subunit2junitxml']
+    logger.debug("Cmd: %s" % (cmd2))
+    subjunit = subprocess.Popen(cmd2, stdin=testrun.stdout,
+				     stdout=test_stdout_fh)
+    testrun.wait()
+    subjunit.wait()
+
+    os.chdir(l_cwd)
+
+    logger.debug("Generating report")
+    test_stdout_fh.seek(0)
+    test_stderr_fh.seek(0)
+    test_doc = db[test_id]
+    report = test_doc['results'][os.path.basename(t)]
+    report["returncode"] = subjunit.returncode
+    report["script_stdout"] = test_stdout_fh.read()
+    report["script_stderr"] = test_stderr_fh.read()
+    report["finished"] = datetime.datetime.utcnow().isoformat()
+    logger.debug("Report: %s" % (report))
+    local_report_fh = open(os.path.join(t_dir, 'report'), 'w')
+    json.dump(report, local_report_fh)
+    local_report_fh.close()
+    test_doc = db[test_id]
+    test_doc['results'][os.path.basename(t)] = report
+    db[test_id] = test_doc
+
+test_doc = db[test_id]
+test_doc['states']['tested'] = datetime.datetime.utcnow().isoformat()
+db[test_id] = test_doc
+
+cmd = ["poweroff"]
+logger.debug("Cmd: %s" % (cmd))
+subprocess.check_call(cmd)

=== added directory 'templates.kernel/test_cases'
=== added directory 'templates.kernel/test_cases/akt-dbench'
=== added file 'templates.kernel/test_cases/akt-dbench/preseed'
--- templates.kernel/test_cases/akt-dbench/preseed	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/akt-dbench/preseed	2011-06-22 08:17:23 +0000
@@ -0,0 +1,287 @@
+### Localization
+# Locale sets language and country.
+d-i debian-installer/locale string en_CA.UTF-8
+
+# Keyboard selection.
+# Disable automatic (interactive) keymap detection.
+d-i console-setup/ask_detect boolean false
+#d-i console-setup/modelcode string pc105
+d-i console-setup/layoutcode string ca
+# To select a variant of the selected layout (if you leave this out, the
+# basic form of the layout will be used):
+#d-i console-setup/variantcode string dvorak
+
+# start the HTTP server early, so that we can grab the d-i log
+# will be executed after network initialisation is completed.
+d-i preseed/early_command string httpd
+
+### Network configuration
+# netcfg will choose an interface that has link if possible. This makes it
+# skip displaying a list if there is more than one interface.
+d-i netcfg/choose_interface select auto
+
+# To pick a particular interface instead:
+#d-i netcfg/choose_interface select eth1
+
+# If you have a slow dhcp server and the installer times out waiting for
+# it, this might be useful.
+d-i netcfg/dhcp_timeout string 180
+
+# If you prefer to configure the network manually, uncomment this line and
+# the static network configuration below.
+#d-i netcfg/disable_dhcp boolean true
+
+# If you want the preconfiguration file to work on systems both with and
+# without a dhcp server, uncomment these lines and the static network
+# configuration below.
+#d-i netcfg/dhcp_failed note
+#d-i netcfg/dhcp_options select Configure network manually
+
+# Static network configuration.
+#d-i netcfg/get_nameservers string 192.168.1.1
+#d-i netcfg/get_ipaddress string 192.168.1.42
+#d-i netcfg/get_netmask string 255.255.255.0
+#d-i netcfg/get_gateway string 192.168.1.1
+#d-i netcfg/confirm_static boolean true
+
+# Any hostname and domain names assigned from dhcp take precedence over
+# values set here. However, setting the values still prevents the questions
+# from being shown, even if values come from dhcp.
+d-i netcfg/get_hostname string {{ hostname }}
+d-i netcfg/get_domain string unassigned-domain
+
+# Disable that annoying WEP key dialog.
+d-i netcfg/wireless_wep string
+# The wacky dhcp hostname that some ISPs use as a password of sorts.
+#d-i netcfg/dhcp_hostname string radish
+
+
+### Mirror settings
+d-i mirror/country string enter information manually
+d-i mirror/http/hostname string mirror:3142
+d-i mirror/http/directory string /ubuntu
+d-i mirror/http/proxy string
+
+# Suite to install.
+#d-i mirror/suite string feisty
+# Suite to use for loading installer components (optional).
+#d-i mirror/udeb/suite string feisty
+
+### Partitioning
+# If the system has free space you can choose to only partition that space.
+# Note: this must be preseeded with a localized (translated) value.
+#d-i partman-auto/init_automatically_partition \
+#      select Use the largest continuous free space
+
+# Alternatively, you can specify a disk to partition. The device name must
+# be given in traditional non-devfs format.
+# For example, to use the first SCSI hard disk:
+d-i partman-auto/disk string /dev/vda
+{% block partman_auto_method %}
+d-i partman-auto/method string regular
+{% endblock %}
+
+# If one of the disks that are going to be automatically partitioned
+# contains an old LVM configuration, the user will normally receive a
+# warning. This can be preseeded away...
+d-i partman-lvm/device_remove_lvm boolean true
+# And the same goes for the confirmation to write the lvm partitions.
+d-i partman-lvm/confirm boolean true
+
+# You can choose from any of the predefined partitioning recipes.
+# Note: this must be preseeded with a localized (translated) value.
+d-i partman-auto/choose_recipe 		select All files in one partition (recommended for new users)
+#d-i partman-auto/choose_recipe \
+#       select Separate /home partition
+#d-i partman-auto/choose_recipe \
+#       select Separate /home, /usr, /var, and /tmp partitions
+
+# Or provide a recipe of your own...
+# The recipe format is documented in the file devel/partman-auto-recipe.txt.
+# If you have a way to get a recipe file into the d-i environment, you can
+# just point at it.
+#d-i partman-auto/expert_recipe_file string /hd-media/recipe
+
+# This makes partman automatically partition without confirmation.
+d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition 		select Finish partitioning and write changes to disk
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+d-i partman-lvm/confirm_nooverwrite boolean true
+
+### Clock and time zone setup
+# Controls whether or not the hardware clock is set to UTC.
+d-i clock-setup/utc boolean true
+
+# Only ask the UTC question if there are other operating systems installed.
+d-i clock-setup/utc-auto boolean true
+
+# You may set this to any valid setting for $TZ; see the contents of
+# /usr/share/zoneinfo/ for valid values.
+d-i time/zone string US/Eastern
+
+
+### Apt setup
+# You can choose to install restricted and universe software, or to install
+# software from the backports repository.
+#d-i apt-setup/restricted boolean true
+#d-i apt-setup/universe boolean true
+#d-i apt-setup/backports boolean true
+# Uncomment this to avoid adding security sources, or
+# add a hostname to use a different server than security.ubuntu.com.
+d-i apt-setup/security_host string
+
+# Additional repositories, local[0-9] available
+#d-i apt-setup/local0/repository string http://server/localrep/ ./
+#d-i apt-setup/local0/comment string Comment
+# Enable deb-src lines
+#d-i apt-setup/local0/source boolean true
+# URL to the public key of the local repository
+#d-i apt-setup/local0/key string http://server/localrep/key
+
+
+### Account setup
+# Skip creation of a root account (normal user account will be able to
+# use sudo). The default is false; preseed this to true if you want to set
+# a root password.
+#d-i passwd/root-login boolean false
+# Alternatively, to skip creation of a normal user account.
+#d-i passwd/make-user boolean false
+
+# Root password, either in clear text
+#d-i passwd/root-password password r00tme
+#d-i passwd/root-password-again password r00tme
+# or encrypted using an MD5 hash.
+#d-i passwd/root-password-crypted password [MD5 hash]
+
+# To create a normal user account.
+d-i passwd/user-fullname string Ubuntu
+d-i passwd/username string ubuntu
+# Normal user's password, either in clear text
+d-i passwd/user-password password !ubuntu123
+d-i passwd/user-password-again password !ubuntu123
+
+
+### Base system installation
+# Select the initramfs generator used to generate the initrd for 2.6 kernels.
+#d-i base-installer/kernel/linux/initramfs-generators string yaird
+
+# Install the different kernel flavor.
+{% block kernel_flavor %}
+d-i	base-installer/kernel/override-image	string linux-server
+{% endblock %}
+
+{% block anna_modules %}
+{% endblock %}
+
+### Boot loader installation
+# Grub is the default boot loader (for x86). If you want lilo installed
+# instead, uncomment this:
+#d-i grub-installer/skip boolean true
+
+# This is fairly safe to set, it makes grub install automatically to the MBR
+# if no other operating system is detected on the machine.
+d-i grub-installer/only_debian boolean true
+
+# This one makes grub-installer install to the MBR if if finds some other OS
+# too, which is less safe as it might not be able to boot that other OS.
+d-i grub-installer/with_other_os boolean true
+
+# Alternatively, if you want to install to a location other than the mbr,
+# uncomment and edit these lines:
+#d-i grub-installer/bootdev  string (hd0,0)
+#d-i grub-installer/only_debian boolean false
+#d-i grub-installer/with_other_os boolean false
+
+
+### Package selection
+
+{% block tasksel_first %}
+tasksel tasksel/first multiselect Basic Ubuntu server
+{% endblock %}
+
+{% block pkgsel_first %}
+d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
+d-i pkgsel/update-policy select No automatic updates
+{% endblock %}
+
+{% block d_i_answers %}
+# debian-installer preseeded answers should be in this block
+{% endblock %}
+
+# Only install basic language packs. Let tasksel ask about tasks.
+d-i pkgsel/language-pack-patterns string
+# No language support packages.
+d-i pkgsel/install-language-support boolean false
+
+# Some versions of the installer can report back on what software you have
+# installed, and what software you use. The default is not to report back,
+# but sending reports helps the project determine what software is most
+# popular and include it on CDs.
+#popularity-contest popularity-contest/participate boolean false
+
+### Finishing up the first stage install
+# Avoid that last message about the install being complete.
+d-i finish-install/reboot_in_progress note
+
+# This will prevent the installer from ejecting the CD during the reboot,
+# which is useful in some situations.
+#d-i cdrom-detect/eject boolean false
+
+
+### X configuration
+# X can detect the right driver for some cards, but if you're preseeding,
+# you override whatever it chooses. Still, vesa will work most places.
+#xserver-xorg xserver-xorg/config/device/driver select vesa
+
+# A caveat with mouse autodetection is that if it fails, X will retry it
+# over and over. So if it's preseeded to be done, there is a possibility of
+# an infinite loop if the mouse is not autodetected.
+#xserver-xorg xserver-xorg/autodetect_mouse boolean true
+
+# Monitor autodetection is recommended.
+#xserver-xorg xserver-xorg/autodetect_monitor boolean true
+# Uncomment if you have an LCD display.
+#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
+# X has three configuration paths for the monitor. Here's how to preseed
+# the "medium" path, which is always available. The "simple" path may not
+# be available, and the "advanced" path asks too many questions.
+#xserver-xorg xserver-xorg/config/monitor/selection-method \
+#       select medium
+#xserver-xorg xserver-xorg/config/monitor/mode-list \
+#       select 800x600 @ 60 Hz
+
+
+### Preseeding other packages
+# Depending on what software you choose to install, or if things go wrong
+# during the installation process, it's possible that other questions may
+# be asked. You can preseed those too, of course. To get a list of every
+# possible question that could be asked during an install, do an
+# installation, and then run these commands:
+#   debconf-get-selections --installer > file
+#   debconf-get-selections >> file
+
+
+
+### Shell commands
+# d-i preseeding is inherently not secure. Nothing in the installer checks
+# for attempts at buffer overflows or other exploits of the values of a
+# preconfiguration file like this one. Only use preconfiguration files from
+# trusted locations! To drive that home, and because it's generally useful,
+# here's a way to run any shell command you'd like inside the installer,
+# automatically.
+
+# This first command is run as early as possible, just after
+# preseeding is read.
+#d-i preseed/early_command string /cdrom/early_command
+
+# This command is run just before the install finishes, but when there is
+# still a usable /target directory. You can chroot to /target and use it
+# directly, or use the apt-install and in-target commands to easily install
+# packages and run commands in the target system.
+#d-i preseed/late_command string echo "send host-name \"<hostname>\";" >> /target/etc/dhcp3/dhclient.conf;
+
+d-i preseed/late_command string cp /run_test /target/usr/local/bin/ ; chroot /target sh -c "sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers; chmod 0755 /usr/local/bin/run_test; echo '/usr/local/bin/run_test --syslog --sleep 30 {{ test_case_url }}' > /etc/rc.local"
+
+{% block preseed_extra %}
+{% endblock %}

=== added file 'templates.kernel/test_cases/akt-dbench/test'
--- templates.kernel/test_cases/akt-dbench/test	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/akt-dbench/test	2011-06-22 08:17:23 +0000
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+
+import logging
+import unittest
+import subprocess
+import sys
+from os import path
+
+logging.basicConfig(level=logging.DEBUG)
+AKT_Release = '0.12.0'
+AKT_Client = 'autotest-client-%s' % AKT_Release
+AKT_ClientTar = '%s.tar.bz2' % AKT_Client
+#AKT = 'http://test.kernel.org/releases/%s/%s' % (AKT_Release, AKT_ClientTar)
+# need to use internal copy of autotest 0.12.0 -- tests/dbench/dbench_startup.patch
+# had to be, er, patched ;-)
+AKT = 'http://people.canonical.com/~cerdea/%s' % (AKT_ClientTar)
+
+def logLines(buffer, logProc):
+    for line in buffer.splitlines():
+        logProc ('%s', line)
+
+def downloadAutotestClient():
+    RC = 0
+    if not path.isfile (AKT_ClientTar):
+        logging.debug('running wget for %s' % AKT) 
+        akt = subprocess.Popen (['wget',
+            '-nv',
+             AKT],
+             stdout=subprocess.PIPE,
+             stderr=subprocess.PIPE)
+        (stdout, stderr) = akt.communicate()
+        logLines (stdout, logging.debug)
+        sys.stderr.write ('%s' % stderr)
+        RC = akt.returncode
+    if RC == 0:
+        logging.debug ('running tar -xjf %s:' % AKT_ClientTar)
+        tar = subprocess.Popen (['tar',
+            '-xjf',
+            AKT_ClientTar],
+            stdout=subprocess.PIPE,
+            stderr=subprocess.PIPE)
+        (stdout, stderr) = tar.communicate ()
+        logLines (stdout, logging.debug)
+        sys.stderr.write ('%s' % stderr)
+        if tar.returncode == 0:
+            return True
+        else:
+            return False
+
+class aktDBenchTest(unittest.TestCase):
+        
+    def testDBench(self):
+        if downloadAutotestClient():
+            logging.debug ('running %s/bin/autotest tests/dbench/control' % AKT_Client)
+            Test = subprocess.Popen (['%s/bin/autotest' % AKT_Client,
+                '%s/tests/dbench/control' % AKT_Client],
+                 stdout=subprocess.PIPE,
+                 stderr=subprocess.PIPE)
+            (stdout, stderr) = Test.communicate ()
+            logging.info ('%s' % stdout)
+            sys.stderr.write ('%s' % stderr)
+            self.assertEqual(Test.returncode, 0)
+
+if __name__ == '__main__':
+    unittest.main()

=== added directory 'templates.kernel/test_cases/akt-tbench'
=== added file 'templates.kernel/test_cases/akt-tbench/preseed'
--- templates.kernel/test_cases/akt-tbench/preseed	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/akt-tbench/preseed	2011-06-22 08:17:23 +0000
@@ -0,0 +1,287 @@
+### Localization
+# Locale sets language and country.
+d-i debian-installer/locale string en_CA.UTF-8
+
+# Keyboard selection.
+# Disable automatic (interactive) keymap detection.
+d-i console-setup/ask_detect boolean false
+#d-i console-setup/modelcode string pc105
+d-i console-setup/layoutcode string ca
+# To select a variant of the selected layout (if you leave this out, the
+# basic form of the layout will be used):
+#d-i console-setup/variantcode string dvorak
+
+# start the HTTP server early, so that we can grab the d-i log
+# # will be executed after network initialisation is completed.
+d-i preseed/early_command string httpd
+
+### Network configuration
+# netcfg will choose an interface that has link if possible. This makes it
+# skip displaying a list if there is more than one interface.
+d-i netcfg/choose_interface select auto
+
+# To pick a particular interface instead:
+#d-i netcfg/choose_interface select eth1
+
+# If you have a slow dhcp server and the installer times out waiting for
+# it, this might be useful.
+d-i netcfg/dhcp_timeout string 180
+
+# If you prefer to configure the network manually, uncomment this line and
+# the static network configuration below.
+#d-i netcfg/disable_dhcp boolean true
+
+# If you want the preconfiguration file to work on systems both with and
+# without a dhcp server, uncomment these lines and the static network
+# configuration below.
+#d-i netcfg/dhcp_failed note
+#d-i netcfg/dhcp_options select Configure network manually
+
+# Static network configuration.
+#d-i netcfg/get_nameservers string 192.168.1.1
+#d-i netcfg/get_ipaddress string 192.168.1.42
+#d-i netcfg/get_netmask string 255.255.255.0
+#d-i netcfg/get_gateway string 192.168.1.1
+#d-i netcfg/confirm_static boolean true
+
+# Any hostname and domain names assigned from dhcp take precedence over
+# values set here. However, setting the values still prevents the questions
+# from being shown, even if values come from dhcp.
+d-i netcfg/get_hostname string {{ hostname }}
+d-i netcfg/get_domain string unassigned-domain
+
+# Disable that annoying WEP key dialog.
+d-i netcfg/wireless_wep string
+# The wacky dhcp hostname that some ISPs use as a password of sorts.
+#d-i netcfg/dhcp_hostname string radish
+
+
+### Mirror settings
+d-i mirror/country string enter information manually
+d-i mirror/http/hostname string mirror:3142
+d-i mirror/http/directory string /ubuntu
+d-i mirror/http/proxy string
+
+# Suite to install.
+#d-i mirror/suite string feisty
+# Suite to use for loading installer components (optional).
+#d-i mirror/udeb/suite string feisty
+
+### Partitioning
+# If the system has free space you can choose to only partition that space.
+# Note: this must be preseeded with a localized (translated) value.
+#d-i partman-auto/init_automatically_partition \
+#      select Use the largest continuous free space
+
+# Alternatively, you can specify a disk to partition. The device name must
+# be given in traditional non-devfs format.
+# For example, to use the first SCSI hard disk:
+d-i partman-auto/disk string /dev/vda
+{% block partman_auto_method %}
+d-i partman-auto/method string regular
+{% endblock %}
+
+# If one of the disks that are going to be automatically partitioned
+# contains an old LVM configuration, the user will normally receive a
+# warning. This can be preseeded away...
+d-i partman-lvm/device_remove_lvm boolean true
+# And the same goes for the confirmation to write the lvm partitions.
+d-i partman-lvm/confirm boolean true
+
+# You can choose from any of the predefined partitioning recipes.
+# Note: this must be preseeded with a localized (translated) value.
+d-i partman-auto/choose_recipe 		select All files in one partition (recommended for new users)
+#d-i partman-auto/choose_recipe \
+#       select Separate /home partition
+#d-i partman-auto/choose_recipe \
+#       select Separate /home, /usr, /var, and /tmp partitions
+
+# Or provide a recipe of your own...
+# The recipe format is documented in the file devel/partman-auto-recipe.txt.
+# If you have a way to get a recipe file into the d-i environment, you can
+# just point at it.
+#d-i partman-auto/expert_recipe_file string /hd-media/recipe
+
+# This makes partman automatically partition without confirmation.
+d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition 		select Finish partitioning and write changes to disk
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+d-i partman-lvm/confirm_nooverwrite boolean true
+
+### Clock and time zone setup
+# Controls whether or not the hardware clock is set to UTC.
+d-i clock-setup/utc boolean true
+
+# Only ask the UTC question if there are other operating systems installed.
+d-i clock-setup/utc-auto boolean true
+
+# You may set this to any valid setting for $TZ; see the contents of
+# /usr/share/zoneinfo/ for valid values.
+d-i time/zone string US/Eastern
+
+
+### Apt setup
+# You can choose to install restricted and universe software, or to install
+# software from the backports repository.
+#d-i apt-setup/restricted boolean true
+#d-i apt-setup/universe boolean true
+#d-i apt-setup/backports boolean true
+# Uncomment this to avoid adding security sources, or
+# add a hostname to use a different server than security.ubuntu.com.
+d-i apt-setup/security_host string
+
+# Additional repositories, local[0-9] available
+#d-i apt-setup/local0/repository string http://server/localrep/ ./
+#d-i apt-setup/local0/comment string Comment
+# Enable deb-src lines
+#d-i apt-setup/local0/source boolean true
+# URL to the public key of the local repository
+#d-i apt-setup/local0/key string http://server/localrep/key
+
+
+### Account setup
+# Skip creation of a root account (normal user account will be able to
+# use sudo). The default is false; preseed this to true if you want to set
+# a root password.
+#d-i passwd/root-login boolean false
+# Alternatively, to skip creation of a normal user account.
+#d-i passwd/make-user boolean false
+
+# Root password, either in clear text
+#d-i passwd/root-password password r00tme
+#d-i passwd/root-password-again password r00tme
+# or encrypted using an MD5 hash.
+#d-i passwd/root-password-crypted password [MD5 hash]
+
+# To create a normal user account.
+d-i passwd/user-fullname string Ubuntu
+d-i passwd/username string ubuntu
+# Normal user's password, either in clear text
+d-i passwd/user-password password !ubuntu123
+d-i passwd/user-password-again password !ubuntu123
+
+
+### Base system installation
+# Select the initramfs generator used to generate the initrd for 2.6 kernels.
+#d-i base-installer/kernel/linux/initramfs-generators string yaird
+
+# Install the different kernel flavor.
+{% block kernel_flavor %}
+d-i	base-installer/kernel/override-image	string linux-server
+{% endblock %}
+
+{% block anna_modules %}
+{% endblock %}
+
+### Boot loader installation
+# Grub is the default boot loader (for x86). If you want lilo installed
+# instead, uncomment this:
+#d-i grub-installer/skip boolean true
+
+# This is fairly safe to set, it makes grub install automatically to the MBR
+# if no other operating system is detected on the machine.
+d-i grub-installer/only_debian boolean true
+
+# This one makes grub-installer install to the MBR if if finds some other OS
+# too, which is less safe as it might not be able to boot that other OS.
+d-i grub-installer/with_other_os boolean true
+
+# Alternatively, if you want to install to a location other than the mbr,
+# uncomment and edit these lines:
+#d-i grub-installer/bootdev  string (hd0,0)
+#d-i grub-installer/only_debian boolean false
+#d-i grub-installer/with_other_os boolean false
+
+
+### Package selection
+
+{% block tasksel_first %}
+tasksel tasksel/first multiselect Basic Ubuntu server
+{% endblock %}
+
+{% block pkgsel_first %}
+d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml build-essential
+d-i pkgsel/update-policy select No automatic updates
+{% endblock %}
+
+{% block d_i_answers %}
+# debian-installer preseeded answers should be in this block
+{% endblock %}
+
+# Only install basic language packs. Let tasksel ask about tasks.
+d-i pkgsel/language-pack-patterns string
+# No language support packages.
+d-i pkgsel/install-language-support boolean false
+
+# Some versions of the installer can report back on what software you have
+# installed, and what software you use. The default is not to report back,
+# but sending reports helps the project determine what software is most
+# popular and include it on CDs.
+#popularity-contest popularity-contest/participate boolean false
+
+### Finishing up the first stage install
+# Avoid that last message about the install being complete.
+d-i finish-install/reboot_in_progress note
+
+# This will prevent the installer from ejecting the CD during the reboot,
+# which is useful in some situations.
+#d-i cdrom-detect/eject boolean false
+
+
+### X configuration
+# X can detect the right driver for some cards, but if you're preseeding,
+# you override whatever it chooses. Still, vesa will work most places.
+#xserver-xorg xserver-xorg/config/device/driver select vesa
+
+# A caveat with mouse autodetection is that if it fails, X will retry it
+# over and over. So if it's preseeded to be done, there is a possibility of
+# an infinite loop if the mouse is not autodetected.
+#xserver-xorg xserver-xorg/autodetect_mouse boolean true
+
+# Monitor autodetection is recommended.
+#xserver-xorg xserver-xorg/autodetect_monitor boolean true
+# Uncomment if you have an LCD display.
+#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
+# X has three configuration paths for the monitor. Here's how to preseed
+# the "medium" path, which is always available. The "simple" path may not
+# be available, and the "advanced" path asks too many questions.
+#xserver-xorg xserver-xorg/config/monitor/selection-method \
+#       select medium
+#xserver-xorg xserver-xorg/config/monitor/mode-list \
+#       select 800x600 @ 60 Hz
+
+
+### Preseeding other packages
+# Depending on what software you choose to install, or if things go wrong
+# during the installation process, it's possible that other questions may
+# be asked. You can preseed those too, of course. To get a list of every
+# possible question that could be asked during an install, do an
+# installation, and then run these commands:
+#   debconf-get-selections --installer > file
+#   debconf-get-selections >> file
+
+
+
+### Shell commands
+# d-i preseeding is inherently not secure. Nothing in the installer checks
+# for attempts at buffer overflows or other exploits of the values of a
+# preconfiguration file like this one. Only use preconfiguration files from
+# trusted locations! To drive that home, and because it's generally useful,
+# here's a way to run any shell command you'd like inside the installer,
+# automatically.
+
+# This first command is run as early as possible, just after
+# preseeding is read.
+#d-i preseed/early_command string /cdrom/early_command
+
+# This command is run just before the install finishes, but when there is
+# still a usable /target directory. You can chroot to /target and use it
+# directly, or use the apt-install and in-target commands to easily install
+# packages and run commands in the target system.
+#d-i preseed/late_command string echo "send host-name \"<hostname>\";" >> /target/etc/dhcp3/dhclient.conf;
+
+d-i preseed/late_command string cp /run_test /target/usr/local/bin/ ; chroot /target sh -c "sed -i 's/^%admin.*/%admin ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers; chmod 0755 /usr/local/bin/run_test; echo '/usr/local/bin/run_test --syslog --sleep 30 {{ test_case_url }}' > /etc/rc.local"
+
+{% block preseed_extra %}
+{% endblock %}

=== added file 'templates.kernel/test_cases/akt-tbench/test'
--- templates.kernel/test_cases/akt-tbench/test	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/akt-tbench/test	2011-06-22 08:17:23 +0000
@@ -0,0 +1,67 @@
+#!/usr/bin/python
+
+import logging
+import unittest
+import subprocess
+import sys
+import time
+from os import path
+
+logging.basicConfig(level=logging.DEBUG)
+AKT_Release = '0.12.0'
+AKT_Client = 'autotest-client-%s' % AKT_Release
+AKT_ClientTar = '%s.tar.bz2' % AKT_Client
+#AKT = 'http://test.kernel.org/releases/%s/%s' % (AKT_Release, AKT_ClientTar)
+# need to use internal copy of autotest 0.12.0 -- tests/dbench/dbench_startup.patch
+# had to be, er, patched ;-)
+AKT = 'http://people.canonical.com/~cerdea/%s' % (AKT_ClientTar)
+
+def logLines(buffer, logProc):
+    for line in buffer.splitlines():
+        logProc ('%s', line)
+
+def downloadAutotestClient():
+    RC = 0
+    if not path.isfile (AKT_ClientTar):
+        logging.debug('running wget for %s' % AKT)
+        akt = subprocess.Popen (['wget',
+             '-nv',
+             AKT],
+             stdout=subprocess.PIPE,
+             stderr=subprocess.PIPE)
+        (stdout, stderr) = akt.communicate()
+        logLines (stdout, logging.debug)
+        sys.stderr.write ('%s' % stderr)
+        RC = akt.returncode
+    if RC == 0:
+        logging.debug ('running tar -xjf %s:' % AKT_ClientTar)
+        tar = subprocess.Popen (['tar',
+            '-xjf',
+            AKT_ClientTar],
+            stdout=subprocess.PIPE,
+            stderr=subprocess.PIPE)
+        (stdout, stderr) = tar.communicate ()
+        logLines (stdout, logging.debug)
+        sys.stderr.write ('%s' % stderr)
+        if tar.returncode == 0:
+            return True
+        else:
+            return False
+
+class aktTBenchTest(unittest.TestCase):
+        
+    def testTBench(self):
+        if downloadAutotestClient():
+            logging.debug ('running %s/bin/autotest tests/tbench/control' % AKT_Client)
+            Test = subprocess.Popen (['%s/bin/autotest' % AKT_Client,
+                '%s/tests/tbench/control' % AKT_Client],
+                 stdout=subprocess.PIPE,
+                 stderr=subprocess.PIPE)
+            (stdout, stderr) = Test.communicate ()
+            logging.info ('%s' % stdout)
+            logging.info ('%s' % stderr)
+            #time.sleep (1200)
+            self.assertEqual(Test.returncode, 0)
+
+if __name__ == '__main__':
+    unittest.main()

=== added directory 'templates.kernel/test_cases/generic'
=== added file 'templates.kernel/test_cases/generic/preseed'
--- templates.kernel/test_cases/generic/preseed	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/generic/preseed	2011-06-22 08:17:23 +0000
@@ -0,0 +1,54 @@
+# 
+# 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/>.
+# 
+
+{% extends "base" %}
+
+{% block kernel_flavor %}
+d-i base-installer/kernel/override-image string linux-generic
+{% endblock %}
+
+{% block pkgsel_first %}
+d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml ltp build-essential
+d-i pkgsel/update-policy select No automatic updates
+{% endblock %}
+
+{% block d_i_answers %}
+postfix postfix/mailname        string  {{ hostname }}
+postfix postfix/tlsmgr_upgrade_warning  boolean
+postfix postfix/recipient_delim string  +
+postfix postfix/main_mailer_type        select  Internet Site
+postfix postfix/retry_upgrade_warning   boolean
+# Install postfix despite an unsupported kernel?
+postfix postfix/kernel_version_warning  boolean
+postfix postfix/relayhost       string
+postfix postfix/procmail        boolean false
+postfix postfix/bad_recipient_delimiter error
+postfix postfix/chattr  boolean false
+postfix postfix/root_address    string
+postfix postfix/rfc1035_violation       boolean false
+postfix postfix/mydomain_warning        boolean
+postfix postfix/mynetworks      string  127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
+postfix postfix/destinations    string  {{ hostname }}, localhost.localdomain, localhost
+postfix postfix/not_configured  error
+postfix postfix/mailbox_limit   string  0
+postfix postfix/protocols       select  all
+{% endblock %}
+
+

=== added file 'templates.kernel/test_cases/generic/test'
--- templates.kernel/test_cases/generic/test	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/generic/test	2011-06-22 08:17:23 +0000
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+import logging
+import unittest
+import subprocess
+import os
+
+logging.basicConfig(level=logging.DEBUG)
+
+class ltpTest(unittest.TestCase):
+        
+    def testLTPlite(self):
+        # hack: at least for ltp-lite:
+        os.makedirs ('/usr/lib/ltp/results/')
+        os.makedirs ('/usr/lib/ltp/tools/pan')
+        os.symlink ('/usr/lib/ltp/tools/ltp-pan', '/usr/lib/ltp/tools/pan/ltp-pan')
+        # end hack
+        logging.debug ('running /usr/lib/ltp/tools/runltp -f ltplite')
+        Test = subprocess.Popen (['/usr/lib/ltp/tools/runltp',
+            '-f ltplite'],
+             stdout=subprocess.PIPE,
+             stderr=subprocess.PIPE)
+        (stdout, stderr) = Test.communicate ()
+        logging.info ('%s' % stdout)
+        logging.info ('%s' % stderr)
+        self.assertEqual(Test.returncode, 0)
+
+if __name__ == '__main__':
+    unittest.main()

=== added directory 'templates.kernel/test_cases/server'
=== added file 'templates.kernel/test_cases/server/preseed'
--- templates.kernel/test_cases/server/preseed	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/server/preseed	2011-06-22 08:17:23 +0000
@@ -0,0 +1,52 @@
+# 
+# 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/>.
+# 
+
+{% extends "base" %}
+
+{% block kernel_flavor %}
+d-i base-installer/kernel/override-image string linux-server
+{% endblock %}
+
+{% block pkgsel_first %}
+d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml ltp build-essential
+d-i pkgsel/update-policy select No automatic updates
+{% endblock %}
+
+{% block d_i_answers %}
+postfix postfix/mailname        string  {{ hostname }}
+postfix postfix/tlsmgr_upgrade_warning  boolean
+postfix postfix/recipient_delim string  +
+postfix postfix/main_mailer_type        select  Internet Site
+postfix postfix/retry_upgrade_warning   boolean
+# Install postfix despite an unsupported kernel?
+postfix postfix/kernel_version_warning  boolean
+postfix postfix/relayhost       string
+postfix postfix/procmail        boolean false
+postfix postfix/bad_recipient_delimiter error
+postfix postfix/chattr  boolean false
+postfix postfix/root_address    string
+postfix postfix/rfc1035_violation       boolean false
+postfix postfix/mydomain_warning        boolean
+postfix postfix/mynetworks      string  127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
+postfix postfix/destinations    string  {{ hostname }}, localhost.localdomain, localhost
+postfix postfix/not_configured  error
+postfix postfix/mailbox_limit   string  0
+postfix postfix/protocols       select  all
+{% endblock %}

=== added file 'templates.kernel/test_cases/server/test'
--- templates.kernel/test_cases/server/test	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/server/test	2011-06-22 08:17:23 +0000
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+import logging
+import unittest
+import subprocess
+import os
+
+logging.basicConfig(level=logging.DEBUG)
+
+class ltpTest(unittest.TestCase):
+        
+    def testLTPlite(self):
+        # hack: at least for ltp-lite:
+        os.makedirs ('/usr/lib/ltp/results/')
+        os.makedirs ('/usr/lib/ltp/tools/pan')
+        os.symlink ('/usr/lib/ltp/tools/ltp-pan', '/usr/lib/ltp/tools/pan/ltp-pan')
+        # end hack
+        logging.debug ('running /usr/lib/ltp/tools/runltp -f ltplite')
+        Test = subprocess.Popen (['/usr/lib/ltp/tools/runltp',
+            '-f ltplite'],
+             stdout=subprocess.PIPE,
+             stderr=subprocess.PIPE)
+        (stdout, stderr) = Test.communicate ()
+        logging.info ('%s' % stdout)
+        logging.info ('%s' % stderr)
+        self.assertEqual(Test.returncode, 0)
+
+if __name__ == '__main__':
+    unittest.main()

=== added directory 'templates.kernel/test_cases/virtual'
=== added file 'templates.kernel/test_cases/virtual/preseed'
--- templates.kernel/test_cases/virtual/preseed	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/virtual/preseed	2011-06-22 08:17:23 +0000
@@ -0,0 +1,58 @@
+# 
+# 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/>.
+# 
+
+{% extends "base" %}
+
+{% block tasksel_first %}
+tasksel tasksel/skip-tasks string standard
+{% endblock %}
+
+{% block kernel_flavor %}
+d-i base-installer/kernel/override-image string linux-virtual
+{% endblock %}
+
+{% block pkgsel_first %}
+d-i pkgsel/include string openssh-server python-couchdb subunit python-subunit python-junitxml ltp build-essential
+d-i pkgsel/update-policy select No automatic updates
+{% endblock %}
+
+{% block d_i_answers %}
+d-i base-installer/kernel/headers   boolean false
+postfix postfix/mailname        string  {{ hostname }}
+postfix postfix/tlsmgr_upgrade_warning  boolean
+postfix postfix/recipient_delim string  +
+postfix postfix/main_mailer_type        select  Internet Site
+postfix postfix/retry_upgrade_warning   boolean
+# Install postfix despite an unsupported kernel?
+postfix postfix/kernel_version_warning  boolean
+postfix postfix/relayhost       string
+postfix postfix/procmail        boolean false
+postfix postfix/bad_recipient_delimiter error
+postfix postfix/chattr  boolean false
+postfix postfix/root_address    string
+postfix postfix/rfc1035_violation       boolean false
+postfix postfix/mydomain_warning        boolean
+postfix postfix/mynetworks      string  127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
+postfix postfix/destinations    string  {{ hostname }}, localhost.localdomain, localhost
+postfix postfix/not_configured  error
+postfix postfix/mailbox_limit   string  0
+postfix postfix/protocols       select  all
+{% endblock %}
+

=== added file 'templates.kernel/test_cases/virtual/test'
--- templates.kernel/test_cases/virtual/test	1970-01-01 00:00:00 +0000
+++ templates.kernel/test_cases/virtual/test	2011-06-22 08:17:23 +0000
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+import logging
+import unittest
+import subprocess
+import os
+
+logging.basicConfig(level=logging.DEBUG)
+
+class ltpTest(unittest.TestCase):
+        
+    def testLTPlite(self):
+        # hack: at least for ltp-lite:
+        os.makedirs ('/usr/lib/ltp/results/')
+        os.makedirs ('/usr/lib/ltp/tools/pan')
+        os.symlink ('/usr/lib/ltp/tools/ltp-pan', '/usr/lib/ltp/tools/pan/ltp-pan')
+        # end hack
+        logging.debug ('running /usr/lib/ltp/tools/runltp -f ltplite')
+        Test = subprocess.Popen (['/usr/lib/ltp/tools/runltp',
+            '-f ltplite'],
+             stdout=subprocess.PIPE,
+             stderr=subprocess.PIPE)
+        (stdout, stderr) = Test.communicate ()
+        logging.info ('%s' % stdout)
+        logging.info ('%s' % stderr)
+        self.assertEqual(Test.returncode, 0)
+
+if __name__ == '__main__':
+    unittest.main()

=== modified file 'templates/dnsmasq-iso-testing.conf'
--- templates/dnsmasq-iso-testing.conf	2010-12-01 17:48:05 +0000
+++ templates/dnsmasq-iso-testing.conf	2011-06-22 08:17:23 +0000
@@ -18,5 +18,6 @@
 # <http://www.gnu.org/licenses/>.
 # 
 
-# Additional configuration directory for ubuntu server iso testing
-conf-dir=/var/lib/ubuntu-server-iso-testing/dnsmasq.d
+# All test cases now boot from same pxelinux image
+# Configuration is specified in pxelinux.cfg/{{MAC_ADDRESS}}
+dhcp-boot=pxelinux.0,192.168.122.1

=== modified file 'templates/pxelinuxcfg.install'
--- templates/pxelinuxcfg.install	2011-01-04 16:04:13 +0000
+++ templates/pxelinuxcfg.install	2011-06-22 08:17:23 +0000
@@ -23,7 +23,7 @@
 default install
 
 label install
-kernel kernel
-initrd initrd
+kernel kernel.{{ uuid }}
+initrd initrd.{{ uuid }}
 append file=/preseed DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us
 

=== modified file 'templates/usit-dnsmasq'
--- templates/usit-dnsmasq	2010-12-01 17:48:05 +0000
+++ templates/usit-dnsmasq	2011-06-22 08:17:23 +0000
@@ -19,4 +19,4 @@
 # 
 
 # Allow ubuntu-server-iso-testing to restart dnsmasq
-usit ALL=NOPASSWD: /usr/sbin/service dnsmasq restart
+usit ALL=NOPASSWD: /usr/bin/pkill -HUP dnsmasq


Follow ups