Skip to content

Commit 0d44b44

Browse files
committed
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 <[email protected]>
1 parent 6b467b9 commit 0d44b44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ if [ "$containerize" ]; then
228228
--cap-add=NET_ADMIN \
229229
--device=/dev/net/tun \
230230
--env PYTHONHASHSEED=${PYTHONHASHSEED:-$(shuf -i 0-$(((1 << 32) - 1)) -n 1)} \
231+
--env PYTHONPYCACHEDIR=/tmp/__pycache__ \
231232
--env VIRTUAL_ENV_DISABLE_PROMPT=yes \
232233
--env INFAMY_ARGS="$INFAMY_ARGS" \
233234
--env INFAMY_EXTRA_ARGS="$INFAMY_EXTRA_ARGS" \

0 commit comments

Comments
 (0)