]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable pytest cacheprovider plugin in CI
authorMichal Nowak <mnowak@isc.org>
Thu, 29 Apr 2021 09:19:13 +0000 (11:19 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 29 Apr 2021 13:29:18 +0000 (15:29 +0200)
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.

.gitlab-ci.yml
bin/tests/system/.gitignore
bin/tests/system/rpzextra/clean.sh
bin/tests/system/shutdown/clean.sh
bin/tests/system/statschannel/.gitignore
bin/tests/system/statschannel/clean.sh
bin/tests/system/timeouts/clean.sh

index 1d87440cd976cd87a2fb64f0e80f3d52c46f560b..828413ddcf328924a575654b0e6c210b5a31600f 100644 (file)
@@ -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
index 82dbeafec9f164528e2d6558c7ca75a816d7b439..525e889ba66b1bd36688fb4bb0643f212adb89aa 100644 (file)
@@ -1,3 +1,4 @@
+.cache
 __pycache__
 dig.out*
 rndc.out*
index 21d058a803f26dd8c2c0e9b0fe3f62913af93203..dbf193e5eb124f1118752c2aa223c903879e371a 100644 (file)
@@ -15,4 +15,3 @@ rm -f ns*/named.run
 rm -f ns*/rpz*.txt
 rm -rf __pycache__
 rm -f *.status
-rm -rf .cache
index c161c2a33a16c7ae6b4a87a763fcc1fa89843afe..8c82e0ed6b90da0f4765e5f032cfa843f16c6a4f 100644 (file)
@@ -15,4 +15,3 @@ rm -f */named.conf
 rm -f */named.run
 rm -rf __pycache__
 rm -f *.status
-rm -rf .cache
index 44fb46c3c09a491585c58c33180fa60573874fd5..a348e5040c3d2ac0cee5da2f21942aa68f106669 100644 (file)
@@ -1,2 +1 @@
-/.cache/
 /__pycache__/
index 6fbdc5c28d9dd4c7765bcc10093df4d8e59aeae4..2e13b1a9a5a0b557320c1d58a31288e8cfd8ab88 100644 (file)
@@ -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__
index b177285085306704c4f8a3cca9fd6f41dca18b90..75fa7ecfd03f7f27771a624f38d8af44fd1b88b3 100644 (file)
@@ -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