summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-24 16:28:47 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-26 22:24:24 +0200
commit15134a8e5458fc634482386f1fd2acbccc3ac892 (patch)
treed0bb1f06d8d6dd0ac4a3dfd1eb1f698816efb55f /test
parent03ae49aca57b499f8ef497c2777b3eaef2516d1a (diff)
Lower-case uname -r output in kernel autoremove helper
This is needed on FreeBSD which has versions like 11.0-RC1, otherwise the tests would fail.
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-kernel-helper-autoremove4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/test-kernel-helper-autoremove b/test/integration/test-kernel-helper-autoremove
index 417dafd65..a70841d9d 100755
--- a/test/integration/test-kernel-helper-autoremove
+++ b/test/integration/test-kernel-helper-autoremove
@@ -6,7 +6,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")"
setupenvironment
configarchitecture 'amd64'
-CURRENTKERNEL="linux-image-$(uname -r)"
+CURRENTKERNEL="linux-image-$(uname -r | tr '[A-Z]' '[a-z]')"
insertinstalledpackage "$CURRENTKERNEL" 'amd64' '5-1'
# debug packages do not need our protection
insertinstalledpackage "${CURRENTKERNEL}-dbg" 'amd64' '5-1'
@@ -49,7 +49,7 @@ testprotected() {
testsuccess --nomsg grep '^\^linux-image-100\\\.0\\\.0-1-generic\$$' protected.list
msgtest 'Check kernel autoremoval protection list includes' 'running kernel'
- testsuccess --nomsg grep "^\\^linux-image-$(uname -r | sed -e 's#\.#\\\\.#g')\\\$\$" protected.list
+ testsuccess --nomsg grep "^\\^linux-image-$(uname -r | tr '[A-Z]' '[a-z]' | sed -e 's#\.#\\\\.#g')\\\$\$" protected.list
msgtest 'Check kernel autoremoval protection list does not include' 'metapackages'
testfailure --nomsg grep -e '^\^linux-image-amd64\$$' -e '^\^linux-image-686-pae\$$' -e ':i386' protected.list