From 8a9637568ebd2b69e733983cbd3ce61d5a66710c Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 16 Dec 2019 11:06:34 -0800 Subject: [PATCH] travis-ci /etc/hosts workaround --- ci/travis-prepare.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/travis-prepare.sh b/ci/travis-prepare.sh index 9797b0faa..393bd80b6 100644 --- a/ci/travis-prepare.sh +++ b/ci/travis-prepare.sh @@ -6,9 +6,18 @@ die() { exit 1 } - if [ -f /etc/hosts ] then + # The travis-ci "bionic" image throws us a curveball in /etc/hosts + # by including two entries for localhost. The first for 127.0.1.1 + # which causes epicsSockResolveTest to fail. + # cat /etc/hosts + # ... + # 127.0.1.1 localhost localhost ip4-loopback + # 127.0.0.1 localhost nettuno travis vagrant travis-job-.... + + sudo sed -i -e '/^127\.0\.1\.1/ s|localhost\s*||g' /etc/hosts + echo "==== /etc/hosts" cat /etc/hosts echo "===="