From d721efc10b35071b85ca98a9338e3981ce36a9ab Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Fri, 10 Mar 2017 21:36:41 +0100 Subject: make travis tests more reliable - add-apt-repository might be missing, so install it to be sure - killing ntp might fail if there is none - removing ipv6 from etc/hosts should not fail Signed-off-by: Sven Nierlein diff --git a/.travis.yml b/.travis.yml index 78ebc30..d68490c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,11 +31,12 @@ matrix: before_install: # Trusty related fixed # multiverse is no on trusty activated (https://github.com/travis-ci/travis-ci/issues/4979) + - sudo apt-get install -qq --no-install-recommends software-properties-common - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse" && sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse" # /etc/hosts has IPv6 hosts (https://github.com/travis-ci/travis-ci/issues/4978) - - sudo [ $(ip addr show | grep "inet6 ::1" | wc -l) -lt "1" ] && sudo sed -i '/^::1/d' /etc/hosts + - sudo [ $(ip addr show | grep "inet6 ::1" | wc -l) -eq "0" ] || sudo sed -i '/^::1/d' /etc/hosts # Trusty has running ntpd on localhost, but we don't like that for our tests - - sudo killall -9 ntpd + - "sudo killall -9 ntpd ||:" # Trusty has no swap, lets create some - sudo fallocate -l 20M /swapfile; sudo chmod 600 /swapfile; sudo mkswap /swapfile; sudo swapon /swapfile - sudo add-apt-repository -y ppa:waja/trusty-backports -- cgit v0.10-9-g596f