GNU bug report logs - #59487
[PATCH 1/2] build-system/dune: Automatically deduce test-target in most cases.

Previous Next

Package: guix-patches;

Reported by: raingloom <raingloom <at> riseup.net>

Date: Tue, 22 Nov 2022 19:48:02 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: raingloom <raingloom <at> riseup.net>
Subject: bug#59487: closed (Re: [PATCH v3 0/6] guix: dune-build-system:
 Run all tests.)
Date: Sun, 15 Jan 2023 15:04:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#59487: [PATCH 1/2] build-system/dune: Automatically deduce test-target in most cases.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 59487 <at> debbugs.gnu.org.

-- 
59487: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59487
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Julien Lepiller <julien <at> lepiller.eu>
To: pukkamustard <pukkamustard <at> posteo.net>
Cc: raingloom <raingloom <at> riseup.net>, 59487-done <at> debbugs.gnu.org
Subject: Re: [PATCH v3 0/6] guix: dune-build-system: Run all tests.
Date: Sun, 15 Jan 2023 16:02:54 +0100
I was able to check the dependents, so pushed to master as
7686b68f6bb1ae5dc206178805c32bceceea3743 -
79bf3b54a64e304a29334b5029c24d942d9dc051.

Note that I moved patches around, to have the last one before removing
test-target. I merged patches 3, 4 and 5 because intermediate states
would have failing packages otherwise. Also, patch 5 had unrelated
changes to lablgtk3 which I droped, because the package still builds.
If that was intentional, please send a new patch for that :)

I also listed all modified packages in the commit message, and removed
the Co-authored line which listed the author already.

Thanks!

[Message part 3 (message/rfc822, inline)]
From: raingloom <raingloom <at> riseup.net>
To: guix-patches <at> gnu.org
Cc: raingloom <raingloom <at> riseup.net>
Subject: [PATCH 1/2] build-system/dune: Automatically deduce test-target in
 most cases.
Date: Tue, 22 Nov 2022 20:47:11 +0100
guix/build-system/dune.scm (dune-build): tests? defaults to #f.
guix/build/dune-build-system.scm (check): Missing test-target is auto-detected.
---
 guix/build-system/dune.scm       | 2 +-
 guix/build/dune-build-system.scm | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index 12100fd8e8..b531d3c337 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -107,7 +107,7 @@ (define* (dune-build name inputs
                      (dune-release-flags ''())
                      (tests? #t)
                      (test-flags ''())
-                     (test-target "test")
+                     (test-target #f)
                      (install-target "install")
                      (validate-runpath? #t)
                      (patch-shebangs? #t)
diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm
index e9ccc71057..8a3725a4e9 100644
--- a/guix/build/dune-build-system.scm
+++ b/guix/build/dune-build-system.scm
@@ -42,12 +42,17 @@ (define* (build #:key (build-flags '()) (jbuild? #f)
                    build-flags)))
   #t)
 
-(define* (check #:key (test-flags '()) (test-target "test") tests?
+(define* (check #:key (test-flags '()) (test-target #f) tests?
                 (jbuild? #f) (package #f) (dune-release-flags '())
                 #:allow-other-keys)
   "Test the given package."
   (when tests?
-    (let ((program (if jbuild? "jbuilder" "dune")))
+    (let ((program (if jbuild? "jbuilder" "dune"))
+          (test-target (or test-target
+                           (cond
+                            ((file-exists? "tests") "tests")
+                            ((file-exists? "test") "test")
+                            (else ".")))))
       (apply invoke program "runtest" test-target
              (append (if package (list "-p" package)
                          dune-release-flags)
-- 
2.38.1




This bug report was last modified 2 years and 118 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.