[linux] 12/12: tests: Use getconfig.py to find the abiname and localversion strings

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Thu Aug 13 13:23:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch benh/autopkgtest
in repository linux.

commit 445f168dd915cb10a68632f48a8038c7c3d50841
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Aug 13 15:22:50 2015 +0200

    tests: Use getconfig.py to find the abiname and localversion strings
---
 debian/templates/tests-control.main.in |  2 +-
 debian/tests/selftests                 | 23 ++++++++++++++++++++---
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/debian/templates/tests-control.main.in b/debian/templates/tests-control.main.in
index 48f2cac..70807f1 100644
--- a/debian/templates/tests-control.main.in
+++ b/debian/templates/tests-control.main.in
@@ -1,4 +1,4 @@
 Tests: selftests
 Restrictions: breaks-testbed, needs-root, isolation-machine
-Depends: kexec-tools, gcc, make, libpopt-dev, gcc-multilib [amd64]
+Depends: kexec-tools, gcc, make, libpopt-dev, gcc-multilib [amd64], python
 Classes: smp
diff --git a/debian/tests/selftests b/debian/tests/selftests
index f0526bb..cb88a89 100644
--- a/debian/tests/selftests
+++ b/debian/tests/selftests
@@ -2,9 +2,26 @@
 
 PATH=/usr/sbin:/sbin:/usr/bin:/bin
 
-# TODO: use current ABI name and all current flavours/featuresets
-abiname=4.2.0-rc6
-localversion=(-amd64)
+getconfig() {
+    debian/bin/getconfig.py "$@"
+}
+
+# Look up current ABI name and 'localversion' (featureset/flavour) suffixes
+abiname=$(getconfig version abiname)
+arch=$(dpkg --print-architecture)
+localversion=()
+for featureset in $(getconfig base $arch featuresets); do
+    enabled="$(getconfig base '' $featureset enabled)"
+    if [ "$enabled" = '' ] || [ "$enabled" = True ]; then
+	for flavour in $(getconfig base $arch $featureset flavours); do
+	    if [ "$featureset" = none ]; then
+		localversion+=-$flavour
+	    else
+		localversion+=-$featureset-$flavour
+	    fi
+	done
+    fi
+done
 steps=${#localversion[*]}
 
 case "${ADT_REBOOT_MARK:-}" in

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list