From ecd2f14c47b784f02a0b2bfb9c1199788ca1a131 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sat, 1 Dec 2018 17:16:01 +0100 Subject: [PATCH] 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 --- tests/topotests/docker/inner/entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/topotests/docker/inner/entrypoint.sh b/tests/topotests/docker/inner/entrypoint.sh index f491d15f79..3050ec86d0 100755 --- a/tests/topotests/docker/inner/entrypoint.sh +++ b/tests/topotests/docker/inner/entrypoint.sh @@ -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 "$@" -- 2.39.5