guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/20: gnu: libgit2: Work around time-dependent unit test.


From: guix-commits
Subject: 02/20: gnu: libgit2: Work around time-dependent unit test.
Date: Sun, 8 May 2022 18:08:38 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit e48b5484afde93294c4ed7215e88ed450842b2e5
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun May 8 23:12:02 2022 +0200

    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".
---
 gnu/packages/version-control.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index d167c9b5aa..b02b6e8493 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]