BUILD: travis: TMPDIR replacement.
TMPDIR default value may be too long to create UNIX sockets for the stats
used during the reg tests. Indeed vtest builds its temporary working directory
${tmpdir} variable from TMPDIR variable, with /tmp as value if not already set.
This is the case on Linux contrary to OS X which sets TMPDIR with a too much long
value.
With this path we revert the part of 88c63a6 commit which tried to shorten this
TMPDIR value modifying script/run-regtests.sh. Unfortunately this was not
sufficient. Furthermore this patch force TMPDIR to /tmp value for all the OS'es.
Thank you to Tim Düsterhus and Ilya for having helped on this issue.
diff --git a/.travis.yml b/.travis.yml
index 4c3834c..87331fc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -61,13 +61,6 @@
# Special flags due to: https://github.com/vtest/VTest/issues/12
- make -C ../vtest FLAGS="-O2 -s -Wall"
-before_script:
- # This is a fix for the super long TMPDIR on Mac making
- # the unix socket path names exceed the maximum allowed
- # length.
- - sed -i'.original' '/TESTDIR=.*haregtests/s/haregtests-.*XXXXXX/regtest.XXX/' scripts/run-regtests.sh
- - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1)
-
script:
- make CC=$CC V=1 TARGET=$TARGET $FLAGS
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi
@@ -75,7 +68,7 @@
- ./haproxy -vv
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
- - env VTEST_PROGRAM=../vtest/vtest make reg-tests
+ - env TMPDIR=/tmp VTEST_PROGRAM=../vtest/vtest make reg-tests
after_failure:
- |