mirror_ubuntu-kernels/debian/tests/ubuntu-regression-suite

47 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2024-07-02 00:48:40 +03:00
#!/bin/sh
set -e
# Only run regression-suite on kernels we can boot in canonistack
source=`dpkg-parsechangelog -SSource`
case $source in
linux|linux-unstable|linux-hwe*|linux-lowlatency*|linux-kvm|linux-oem)
;;
*)
echo "ubuntu-regression-suite is pointless, if one cannot boot the kernel"
exit 77
;;
esac
# Only run regression-suite if we were requested to
have_meta=0
for trigger in ${ADT_TEST_TRIGGERS}
do
case "$trigger" in
linux-meta/*|linux-meta-*/*)
have_meta=1
;;
esac
done
if [ -n "$ADT_TEST_TRIGGERS" ] && [ "$have_meta" -eq 0 ]; then
echo "ubuntu-regression-suite is not requested, as there is no linux-meta trigger"
exit 77
fi
sver=`dpkg-parsechangelog -SVersion`
read x rver x </proc/version_signature
flavour=${rver#*-*-}
rver=${rver%-$flavour}
echo "Source Package Version: $sver"
echo "Running Kernel Version: $rver"
if [ "$sver" != "$rver" ]; then
echo "ERROR: running version does not match source package" 1>&2
exit 1
fi
git clone --depth=1 -b autotest3 git://git.launchpad.net/~canonical-kernel-team/+git/kernel-testing
git -C kernel-testing/ show HEAD -q
kernel-testing/run-dep8-tests