diff options
author | Sven Nierlein <sven@nierlein.de> | 2017-03-10 20:36:41 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2017-03-12 21:55:52 (GMT) |
commit | d721efc10b35071b85ca98a9338e3981ce36a9ab (patch) | |
tree | b27b1bb4a847c75bed1e1b820881e83e0442bd1d | |
parent | 3b962208e790e859ce68346379020ca92251c0a2 (diff) | |
download | monitoring-plugins-d721efc10b35071b85ca98a9338e3981ce36a9ab.tar.gz |
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 <sven@nierlein.de>
-rw-r--r-- | .travis.yml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 78ebc30..d68490c 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -31,11 +31,12 @@ matrix: | |||
31 | before_install: | 31 | before_install: |
32 | # Trusty related fixed | 32 | # Trusty related fixed |
33 | # multiverse is no on trusty activated (https://github.com/travis-ci/travis-ci/issues/4979) | 33 | # multiverse is no on trusty activated (https://github.com/travis-ci/travis-ci/issues/4979) |
34 | - sudo apt-get install -qq --no-install-recommends software-properties-common | ||
34 | - 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" | 35 | - 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" |
35 | # /etc/hosts has IPv6 hosts (https://github.com/travis-ci/travis-ci/issues/4978) | 36 | # /etc/hosts has IPv6 hosts (https://github.com/travis-ci/travis-ci/issues/4978) |
36 | - sudo [ $(ip addr show | grep "inet6 ::1" | wc -l) -lt "1" ] && sudo sed -i '/^::1/d' /etc/hosts | 37 | - sudo [ $(ip addr show | grep "inet6 ::1" | wc -l) -eq "0" ] || sudo sed -i '/^::1/d' /etc/hosts |
37 | # Trusty has running ntpd on localhost, but we don't like that for our tests | 38 | # Trusty has running ntpd on localhost, but we don't like that for our tests |
38 | - sudo killall -9 ntpd | 39 | - "sudo killall -9 ntpd ||:" |
39 | # Trusty has no swap, lets create some | 40 | # Trusty has no swap, lets create some |
40 | - sudo fallocate -l 20M /swapfile; sudo chmod 600 /swapfile; sudo mkswap /swapfile; sudo swapon /swapfile | 41 | - sudo fallocate -l 20M /swapfile; sudo chmod 600 /swapfile; sudo mkswap /swapfile; sudo swapon /swapfile |
41 | - sudo add-apt-repository -y ppa:waja/trusty-backports | 42 | - sudo add-apt-repository -y ppa:waja/trusty-backports |