summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-05-08 23:12:02 +0200
committerLudovic Courtès <ludo@gnu.org>2022-05-08 23:14:30 +0200
commitf5fe0082abe4547f3fb9f29d8351473cfb3a387b (patch)
treee76d34afa3be2cb936348417b6e03b1327bfc1a1 /gnu
parent8a340e032a9b04d2518b458c93e8569263267913 (diff)
downloadguix-f5fe0082abe4547f3fb9f29d8351473cfb3a387b.tar.gz
gnu: libgit2: Work around time-dependent unit test.
Fixes <https://issues.guix.gnu.org/55326>.

* gnu/packages/version-control.scm (libgit2)[source]: Augment 'snippet'
to modify "tests/refs/revparse.c".
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/version-control.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 7574afda86..ca339b9285 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -802,7 +802,16 @@ to GitHub contributions calendar.")
                (base32
                 "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))
               (modules '((guix build utils)))
-              (snippet '(delete-file-recursively "deps"))))
+              (snippet
+               '(begin
+                  (delete-file-recursively "deps")
+
+                  ;; The "refs:revparse::date" test is time-dependent: it
+                  ;; assumes "HEAD@{10 years ago}" doesn't match anything,
+                  ;; which is no longer true.  Adjust that test.
+                  (substitute* "tests/refs/revparse.c"
+                    (("10 years ago")
+                     "100 years ago"))))))
     (build-system cmake-build-system)
     (outputs '("out" "debug"))
     (arguments