diff options
author | Ilya Maximets <i.maximets@samsung.com> | 2019-05-16 19:39:21 +0300 |
---|---|---|
committer | Ilya Maximets <i.maximets@samsung.com> | 2019-06-10 17:46:11 +0300 |
commit | c94e2d64f05e81b21aa1e027d5c00db8bf2dd91d (patch) | |
tree | 92193f1bdaf801b2ceda18fd6dce84aa5a407a75 /.travis | |
parent | 40535924aa0673b7eca7960fde3f52c97790ad00 (diff) | |
download | openvswitch-c94e2d64f05e81b21aa1e027d5c00db8bf2dd91d.tar.gz |
travis: Test with latest stable kernel releases.
Instead of managing kernel minor versions manually we could always test
with the most recent stable release of the desired branch.
With this patch applied Travis will always check with the most recent
kernels, so we'll be notified about changes in upstream kernels that
breaks the build of our kernel module. However, this will also break
Travis checks on patches that doesn't touch the kernel parts until
we fix the module.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Tested-by: Yifeng Sun <pkusunyifeng@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/linux-build.sh | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index 79ba4009e..123cde575 100755 --- a/.travis/linux-build.sh +++ b/.travis/linux-build.sh @@ -19,11 +19,23 @@ function install_kernel() PREFIX="v2.6/longterm/v2.6.32" fi - url="https://cdn.kernel.org/pub/linux/kernel/${PREFIX}/linux-${1}.tar.xz" + base_url="https://cdn.kernel.org/pub/linux/kernel/${PREFIX}" + # Download page with list of all available kernel versions. + wget ${base_url}/ + # Uncompress in case server returned gzipped page. + (file index* | grep ASCII) || (mv index* index.new.gz && gunzip index*) + # Get version of the latest stable release. + hi_ver=$(echo ${1} | sed 's/\./\\\./') + lo_ver=$(cat ./index* | grep -P -o "${hi_ver}\.[0-9]+" | \ + sed 's/.*\..*\.\(.*\)/\1/' | sort -h | tail -1) + version="${1}.${lo_ver}" + + url="${base_url}/linux-${version}.tar.xz" # Download kernel sources. Try direct link on CDN failure. wget ${url} || wget ${url} || wget ${url/cdn/www} - tar xvf linux-${1}.tar.xz > /dev/null - cd linux-${1} + + tar xvf linux-${version}.tar.xz > /dev/null + cd linux-${version} make allmodconfig # Cannot use CONFIG_KCOV: -fsanitize-coverage=trace-pc is not supported by compiler |