test: redirect python cache to /tmp to fix cleanup issues

Set PYTHONPYCACHEDIR=/tmp/__pycache__ in test/env to avoid permission issues
during git cleanup operations.  When tests run in Docker containers as root,
__pycache__ directories and .pyc files end up owned by root, preventing the
CI user from cleaning them up.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2025-11-20 10:45:43 +01:00
parent 6b467b99a8
commit 0d44b44bac
+1
View File
@@ -228,6 +228,7 @@ if [ "$containerize" ]; then
--cap-add=NET_ADMIN \
--device=/dev/net/tun \
--env PYTHONHASHSEED=${PYTHONHASHSEED:-$(shuf -i 0-$(((1 << 32) - 1)) -n 1)} \
--env PYTHONPYCACHEDIR=/tmp/__pycache__ \
--env VIRTUAL_ENV_DISABLE_PROMPT=yes \
--env INFAMY_ARGS="$INFAMY_ARGS" \
--env INFAMY_EXTRA_ARGS="$INFAMY_EXTRA_ARGS" \