From f657669eafe42d2b25e33e8b9e6120b732aafe0c Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Mon, 30 Sep 2019 13:08:39 +0200 Subject: [PATCH] test: don't create Python .pyc files Python byte code files are created with root ownership if autotest.sh is run with sudo. This can cause permission problems when doing "rm" or "git clean". Change-Id: I0a099dcd94732bb293aea1bf0278656db0afba5f Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469864 Tested-by: SPDK CI Jenkins Reviewed-by: Maciej Wawryk Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- test/common/autotest_common.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 591f3085d..c1ebf4542 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -68,6 +68,10 @@ export RUN_NIGHTLY_FAILING # specific use cases for tests. export PYTHONPATH=$PYTHONPATH:$rootdir/scripts +# Don't create Python .pyc files. When running with sudo these will be +# created with root ownership and can cause problems when cleaning the repository. +export PYTHONDONTWRITEBYTECODE=1 + # Export flag to skip the known bug that exists in librados # Bug is reported on ceph bug tracker with number 24078 export ASAN_OPTIONS=new_delete_type_mismatch=0