From: Michal Nowak Date: Thu, 29 Apr 2021 09:19:13 +0000 (+0200) Subject: Disable pytest cacheprovider plugin in CI X-Git-Tag: v9.17.13~30^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1c30341076e0e1e76fbbb6cad6eb8086e6fc0e6;p=thirdparty%2Fbind9.git Disable pytest cacheprovider plugin in CI The pytest "cacheprovider" plugin produces a .cache/v/cache/lastfailed file, which holds a Python dictionary structure with failed tests. However, on Ubuntu 16.04 (Xenial) the file is created even though the test passed and the file contains just an empty dictionary ("{}"). Given that we are not interested in this feature, disabling the "cacheprovider" plugin globally and removing per-test removals of the .cache directory seems like the best course of action. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d87440cd97..828413ddcf3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,6 +39,10 @@ variables: # In multithreaded unit tests, abort on the first failure CMOCKA_TEST_ABORT: 1 + # Disable pytest's "cacheprovider" plugin to prevent it from creating + # cross-testrun files as there is no need to use that feature in CI. + PYTEST_ADDOPTS: "-p no:cacheprovider" + # Default platforms to run "stress" tests on BIND_STRESS_TEST_OS: linux BIND_STRESS_TEST_ARCH: amd64 diff --git a/bin/tests/system/.gitignore b/bin/tests/system/.gitignore index 82dbeafec9f..525e889ba66 100644 --- a/bin/tests/system/.gitignore +++ b/bin/tests/system/.gitignore @@ -1,3 +1,4 @@ +.cache __pycache__ dig.out* rndc.out* diff --git a/bin/tests/system/rpzextra/clean.sh b/bin/tests/system/rpzextra/clean.sh index 21d058a803f..dbf193e5eb1 100644 --- a/bin/tests/system/rpzextra/clean.sh +++ b/bin/tests/system/rpzextra/clean.sh @@ -15,4 +15,3 @@ rm -f ns*/named.run rm -f ns*/rpz*.txt rm -rf __pycache__ rm -f *.status -rm -rf .cache diff --git a/bin/tests/system/shutdown/clean.sh b/bin/tests/system/shutdown/clean.sh index c161c2a33a1..8c82e0ed6b9 100644 --- a/bin/tests/system/shutdown/clean.sh +++ b/bin/tests/system/shutdown/clean.sh @@ -15,4 +15,3 @@ rm -f */named.conf rm -f */named.run rm -rf __pycache__ rm -f *.status -rm -rf .cache diff --git a/bin/tests/system/statschannel/.gitignore b/bin/tests/system/statschannel/.gitignore index 44fb46c3c09..a348e5040c3 100644 --- a/bin/tests/system/statschannel/.gitignore +++ b/bin/tests/system/statschannel/.gitignore @@ -1,2 +1 @@ -/.cache/ /__pycache__/ diff --git a/bin/tests/system/statschannel/clean.sh b/bin/tests/system/statschannel/clean.sh index 6fbdc5c28d9..2e13b1a9a5a 100644 --- a/bin/tests/system/statschannel/clean.sh +++ b/bin/tests/system/statschannel/clean.sh @@ -27,4 +27,4 @@ rm -f traffic traffic.out.* traffic.json.* traffic.xml.* rm -f xml.*mem json.*mem rm -f xml.*stats json.*stats rm -f zones zones.out.* zones.json.* zones.xml.* zones.expect.* -rm -rf ./.cache ./__pycache__ +rm -rf ./__pycache__ diff --git a/bin/tests/system/timeouts/clean.sh b/bin/tests/system/timeouts/clean.sh index b1772850853..75fa7ecfd03 100644 --- a/bin/tests/system/timeouts/clean.sh +++ b/bin/tests/system/timeouts/clean.sh @@ -15,5 +15,5 @@ rm -f ./ns*/named.lock rm -f ./ns*/named.memstats rm -f ./ns*/named.run* rm -f ./ns*/named.stats -rm -rf ./.cache ./__pycache__ +rm -rf ./__pycache__ rm -f ./ns*/large.db