]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests/topotests: Set -o cache_dir=/tmp
authorChristian Franke <chris@opensourcerouting.org>
Sat, 1 Dec 2018 16:16:01 +0000 (17:16 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Sat, 1 Dec 2018 16:16:01 +0000 (17:16 +0100)
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>
tests/topotests/docker/inner/entrypoint.sh

index f491d15f79191f43c9c260aced28fce5814ef2fb..3050ec86d0effc4aff4172f6784e6757e88df208 100755 (executable)
@@ -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 "$@"