GNU bug report logs -
#59487
[PATCH 1/2] build-system/dune: Automatically deduce test-target in most cases.
Previous Next
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
Hi! Sorry, I missed these patches and only found them after realizing
that your Mirage patches require these.
I'm having trouble applying the second patch (of V2), maybe there have
been changes that cause conflicts? Could you rebase on master or just
resend the V2 patches to 59487 <at> debbugs.gnu.org? Maybe with a short
comment if and how they address Julien's suggestion?
-pukkamustard
raingloom <raingloom <at> riseup.net> writes:
> 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)
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.