tests/topotests: Set -o cache_dir=/tmp

We are mounting the topotests from the host into the container
and mark them as read-only to avoid any modifications to the host.

Pytest tries to create a .pytest_chache directory in that location
which fails because of the read-only mount.

Configure a different cache dir which is writable to resolve this.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
Christian Franke 2018-12-01 17:16:01 +01:00
parent 659782730b
commit ecd2f14c47

View File

@ -40,7 +40,10 @@ chmod 1777 /tmp
if [ $# -eq 0 ] || ([[ "$1" != /* ]] && [[ "$1" != ./* ]]); then
export TOPOTESTS_CHECK_MEMLEAK=/tmp/memleak_
export TOPOTESTS_CHECK_STDERR=Yes
set -- pytest --junitxml /tmp/topotests.xml "$@"
set -- pytest \
--junitxml /tmp/topotests.xml \
-o cache_dir=/tmp \
"$@"
fi
exec "$@"