unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Csepp <raingloom@riseup.net>
To: pukkamustard <pukkamustard@posteo.net>
Cc: julien@lepiller.eu, Csepp <raingloom@riseup.net>, 59487@debbugs.gnu.org
Subject: [bug#59487] [PATCH v2 1/2] build-system/dune: Automatically deduce test-target in most cases.
Date: Thu, 12 Jan 2023 22:20:24 +0100	[thread overview]
Message-ID: <86fscfphy8.fsf@riseup.net> (raw)
In-Reply-To: <86mt6npmmb.fsf@riseup.net>


Csepp <raingloom@riseup.net> writes:

> pukkamustard <pukkamustard@posteo.net> writes:
>
>> Thanks for this! I think it is a valuable improvement.
>>
>> Csepp <raingloom@riseup.net> writes:
>>
>>> From: raingloom <raingloom@riseup.net>
>>>
>>> guix/build-system/dune.scm (dune-build): tests? defaults to #f.
>>
>> This should be: "test-target defaults to #f".
>>
>>> +    (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"
>>> +             (append (if test-target (list test-target) '())
>>> +                     (if package (list "-p" package)
>>>                           dune-release-flags)
>>>                       test-flags))))
>>>    #t)
>>
>> I think what Julien ment (and I agree) is that you can completely drop
>> the checks for the files/directories "tests" or "test" to exist.
>>
>> In your patch, if test-target is #f and "test" or "tests" do not exist,
>> then the we will run:
>>
>> `dune runtest -p package .`
>>
>> but we could (and maybe should) run just:
>>
>> `dune runtest -p package`
>>
>> In fact, we should run this even if the "test" or "tests" directories
>> exist (otherwise we might miss running some tests placed in other
>> directories).
>>
>> So this would be enough:
>>
>>> +    (let ((program (if jbuild? "jbuilder" "dune")))
>>> +      (apply invoke program "runtest"
>>> +             (append (if test-target (list test-target) '())
>>> +                     (if package (list "-p" package)
>>>                           dune-release-flags)
>>>                       test-flags)))
>>
>> Thinking of this, maybe we can drop the `test-target` argument
>> completely. wdyt?
>>
>> -pukkamustard
>
> Hmm, makes sense.  I'll test what complete removal does.

Well ocaml-ppxlib fails and I should be working my MirageOS thesis
stuff, so I'll leave this up to you.  Or I'll get back to it once I
figure out how cross-toolchains are supposed to work.




  reply	other threads:[~2023-01-12 21:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 19:47 [bug#59487] [PATCH 1/2] build-system/dune: Automatically deduce test-target in most cases raingloom
2022-11-22 19:47 ` [bug#59488] [PATCH 2/2] gnu: Remove explicit test-target arguments in ocaml.scm raingloom
2023-01-28 12:23   ` bug#59488: " Julien Lepiller
2022-11-22 20:26 ` [bug#59487] [PATCH 1/2] build-system/dune: Automatically deduce test-target in most cases Julien Lepiller
2023-01-10 20:24 ` pukkamustard
2023-01-11 17:41   ` Csepp
2023-01-11 17:40 ` [bug#59487] [PATCH v2 " Csepp
2023-01-11 17:40   ` [bug#59487] [PATCH v2 2/2] gnu: Remove explicit test-target arguments in ocaml.scm Csepp
2023-01-12 15:42   ` [bug#59487] [PATCH v2 1/2] build-system/dune: Automatically deduce test-target in most cases pukkamustard
2023-01-12 18:44     ` pukkamustard
2023-01-12 19:39     ` Csepp
2023-01-12 21:20       ` Csepp [this message]
2023-01-13 10:54 ` [bug#59487] [PATCH v3 0/6] guix: dune-build-system: Run all tests pukkamustard
2023-01-13 10:54   ` [bug#59487] [PATCH v3 1/6] gnu: Add ocaml-cinaps pukkamustard
2023-01-13 10:54   ` [bug#59487] [PATCH v3 2/6] gnu: ocaml-ppxlib: Clean up inputs pukkamustard
2023-01-13 10:54   ` [bug#59487] [PATCH v3 3/6] gnu: ocaml-cohttp: Run tests pukkamustard
2023-01-13 10:54   ` [bug#59487] [PATCH v3 4/6] guix: dune-build-system: Run all tests pukkamustard
2023-01-13 10:54   ` [bug#59487] [PATCH v3 5/6] guix: dune-build-system: Remove usage of test-target argument pukkamustard
2023-01-13 10:54   ` [bug#59487] [PATCH v3 6/6] gnu: ocaml-ppx-expect: Disable tests pukkamustard
2023-01-15 15:02   ` bug#59487: [PATCH v3 0/6] guix: dune-build-system: Run all tests Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86fscfphy8.fsf@riseup.net \
    --to=raingloom@riseup.net \
    --cc=59487@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    --cc=pukkamustard@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).