[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.50-109-g8e9eadf

Andreas Beckmann anbe at debian.org
Sat May 4 12:23:31 UTC 2013


The following commit has been merged in the develop branch:
commit 8e9eadf5c74bfde189727139c79823592b8a2888
Author: Andreas Beckmann <anbe at debian.org>
Date:   Fri May 3 11:29:15 2013 +0200

    p: add --arch option to support testing a non-default architecture
    
    e.g. allows testing i386 on an amd64 host
    (without requiring the slave to run in an i386 chroot)
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 51ea43f..2f30898 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ piuparts (0.51) UNRELEASED; urgency=low
   * piuparts.py:
     - In install-purge tests support installing extra packages before the
       package to be tested via --extra-old-packages.
+    - Add --arch <arch> option to run the test for the requested instead of
+      the default architecture.
   * piuparts.conf:
   * distros.conf:
     - Update backports setup after integration into the regular archive.
diff --git a/piuparts.1.txt b/piuparts.1.txt
index 6a1d68e..d62ddff 100644
--- a/piuparts.1.txt
+++ b/piuparts.1.txt
@@ -42,6 +42,9 @@ Options must come before the other command line arguments.
 *-a, --apt*::
   The package arguments on the command line are to be treated as package names and installed via *apt-get* instead  of  being  names  of  package  files, to be installed via *dpkg -i*.
 
+*--arch*='arch'::
+  Create chroot and run tests for (non-default) architecture 'arch'. The default is the output from 'dpkg --print-architecture'.
+
 *-b* tarball, *--basetgz*='tarball'::
   Use tarball as the contents of the initial chroot, instead of building a new one with debootstrap.
 +
diff --git a/piuparts.py b/piuparts.py
index 525654f..88761c9 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -159,6 +159,7 @@ class Settings:
         self.scriptsdirs = []
         self.bindmounts = []
         # chroot setup
+        self.arch = None
         self.basetgz = None
         self.savetgz = None
         self.lvm_volume = None
@@ -1019,6 +1020,8 @@ class Chroot:
         if settings.eatmydata:
             options.append('--include=eatmydata')
         options.append('--components=%s' % ','.join(settings.debian_mirrors[0][1]))
+        if settings.arch:
+            options.append('--arch=%s' % settings.arch)
         run(prefix + ["debootstrap", "--variant=minbase"] + options +
             [settings.debian_distros[0], self.name, settings.distro_config.get_mirror(settings.debian_distros[0])])
         self.bootstrapped = True
@@ -2500,6 +2503,9 @@ def parse_command_line():
                       help="Command line arguments are package names " +
                            "to be installed via apt.")
 
+    parser.add_option("--arch", metavar="ARCH", action="store",
+                      help="Create chroot and run tests for (non-default) architecture ARCH.")
+
     parser.add_option("--adt-virt",
                       metavar='CMDLINE', default=None,
                       help="Use CMDLINE via autopkgtest (adt-virt-*)"
@@ -2775,6 +2781,7 @@ def parse_command_line():
     settings.scriptsdirs = opts.scriptsdir
     settings.bindmounts += opts.bindmount
     # chroot setup
+    settings.arch = opts.arch
     settings.basetgz = opts.basetgz
     settings.savetgz = opts.save
     settings.lvm_volume = opts.lvm_volume

-- 
piuparts git repository



More information about the Piuparts-commits mailing list