[diffoscope] 01/02: tests/comparators/test_fsimage: put the 400MB cache in a more obvious place

Ximin Luo infinity0 at debian.org
Fri Jun 30 20:01:19 CEST 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository diffoscope.

commit c07970f7e14bc912424148fe2b06ff0ce621a22d
Author: Ximin Luo <infinity0 at debian.org>
Date:   Fri Jun 30 19:33:59 2017 +0200

    tests/comparators/test_fsimage: put the 400MB cache in a more obvious place
---
 tests/comparators/test_fsimage.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/comparators/test_fsimage.py b/tests/comparators/test_fsimage.py
index 5003d6d..e2a5b7c 100644
--- a/tests/comparators/test_fsimage.py
+++ b/tests/comparators/test_fsimage.py
@@ -18,6 +18,7 @@
 # along with diffoscope.  If not, see <https://www.gnu.org/licenses/>.
 
 import pytest
+import os
 
 from diffoscope.config import Config
 from diffoscope.comparators.missing_file import MissingFile
@@ -35,6 +36,9 @@ def guestfs_working():
     except ImportError:
         return False
     g = guestfs.GuestFS (python_return_dict=True)
+    cachedir = os.path.join(os.getcwd(), "cache")
+    os.makedirs(cachedir, exist_ok=True)
+    g.set_cachedir(cachedir)
     g.add_drive_opts("/dev/null", format="raw", readonly=1)
     try:
         g.launch()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list