summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-08-20 15:55:26 +0200
committerLeo Famulari <leo@famulari.name>2021-07-27 12:34:57 -0400
commita24631a6dfc765c1e4e3f56cca51bd12672e8726 (patch)
tree190b45ed2af100a39a15bd3e1c0a83949221bd0f /gnu
parent8d25a14aace00ee11ee350efa241ea48d0033435 (diff)
downloadguix-a24631a6dfc765c1e4e3f56cca51bd12672e8726.tar.gz
gnu: appstream-glib: Fix failing tests.
* gnu/packages/glib.scm (appstream-glib)[arguments]<#:phases>{set-home}: Add a
new phase 'set-home' for tests that want to write to $HOME.

Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/glib.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index a9c7f4a81c..f0328498e4 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1097,7 +1097,11 @@ Some codes examples can be find at:
            (lambda _
              (substitute* "libappstream-glib/as-self-test.c"
                (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
-             #t)))))
+             #t))
+         (add-before 'check 'set-home
+           (lambda _
+             ;; Some tests want write access there.
+             (setenv "HOME" "/tmp"))))))
     (home-page "https://github.com/hughsie/appstream-glib")
     (synopsis "Library for reading and writing AppStream metadata")
     (description "This library provides objects and helper methods to help