]> 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:49:44 +0000 (15:49 +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.

(cherry picked from commit e1c30341076e0e1e76fbbb6cad6eb8086e6fc0e6)

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

index beee59818b95c0700f3a097309274d92c4b8da09..7e1659519a8d2806e1541dd3e0ea2014f8ca1933 100644 (file)
@@ -32,6 +32,10 @@ variables:
 
   BIND_INSTALL_PATH: "${CI_PROJECT_DIR}/.local"
 
+  # 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 38d1707c8f740ec0d85956d5fac6c0c7445ba3c5..3747a7f914a79cc2bbc4747c0fa44e5344eef276 100644 (file)
@@ -1,3 +1,4 @@
+.cache
 __pycache__
 dig.out*
 rndc.out*
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