travis-ci network fixup

This commit is contained in:
Michael Davidsaver
2020-08-12 16:34:14 -07:00
parent fe43843a08
commit c6199d359a
2 changed files with 24 additions and 0 deletions

23
.ci-local/travis-fixup.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
set -e -u -x
env|grep TRAVIS
[ "$TRAVIS_OS_NAME" = "linux" ] || exit 0
# Ensure there is an interface with a (correct) broadcast address
# eg. 'trusty' VMs have interface broadcast address mis-configured
# (why oh why do people insist on setting this explicitly?)
sudo ip tuntap add dev tap42 mode tap
sudo ip addr add 192.168.240.1/24 broadcast + dev tap42
sudo ip link set dev tap42 up
# note that this device will be UP but not RUNNING
# so java will see it as not UP since java confuses UP and RUNNING
ip link
ip addr
ip route

View File

@ -31,6 +31,7 @@ addons:
- qemu-system-x86
install:
- ./.ci-local/travis-fixup.sh
- ./.ci/travis/prepare.sh
script: