tests: fix sorting kernel version

Debian now has 4.9 and 4.19 kernels installed, so `sort -n` sorts them
wrong.
This commit is contained in:
Marek Marczykowski-Górecki 2019-09-27 16:28:23 +02:00
parent 5fa75d73be
commit 34e2f3a322
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -72,7 +72,7 @@ class GrubBase(object):
elif self.template.startswith('debian-'):
cmd_get_kernel_version = \
'dpkg-query --showformat=\'${Package}\\n\' --show ' \
'\'linux-image-*-amd64\'|sort -n|tail -1|cut -d - -f 3-'
'\'linux-image-*-amd64\'|sort -V|tail -1|cut -d - -f 3-'
else:
raise RuntimeError("Unsupported template?!")