unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: shortening the git test suite
Date: Wed, 11 Jul 2018 14:46:13 +0200	[thread overview]
Message-ID: <87k1q2kkiy.fsf@gnu.org> (raw)
In-Reply-To: <87a7r3gfmx.fsf@netris.org> (Mark H. Weaver's message of "Sat, 07 Jul 2018 12:44:06 -0400")

Hello,

Mark H Weaver <mhw@netris.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:

[...]

>> Currently if test fails, the whole derivation fails, and you can’t
>> install your package.  If tests were run separately, this would no
>> longer hold: you could get your package regardless of whether tests
>> fail.
>
> Indeed, and I agree that we would need to address this.
>
>> How would you address this?  I guess that calls for a new build
>> model, no?
>
> I'm not sure what you mean by "build model", whether you are talking
> about the daemon interface or something else, but I think the changes
> could be confined to the Guix user interface.  A field could be added to
> <package>, somewhat similar to 'replacement', but pointing to a package
> object which runs tests, or perhaps a list of package objects.  The guix
> client could simply add the test packages to the list of derivations to
> build.  This could be inhibited via a "--no-tests" guix build option.
>
> In typical cases where "make check" expects to be run from a fully built
> source directory, the main package would typically produce a tarball of
> the built source directory as an additional output.  The test package
> would simply unpack this tarball and run "make check" in it.
>
> Regarding the build order: ideally, we would run the tests for package
> FOO immediately after building FOO, or at least before building anything
> that depends on FOO, to avoid wasted work in case the tests fail.  I'm
> not sure how best to accomplish this.
>
> What do you think?

I’m afraid doing everything at the level of package objects rather than
derivations would lead to something clunky (grafts already suffer from
that.)

Namely, Guix clients would have to explicitly do a second
‘build-derivations’ RPC once they’re done building packages.  If they
don’t do that, then tests are not run and you get to install a possibly
broken package.

Besides, there are lots of details to get right in a proposal like
yours.  In particular, saving the build tree and for later reuse may
prove to be more challenging than it seems.

IOW, this looks like a radical change with lots of potential pitfalls,
one I’d rather not make before 1.0.  I agree that long test suites can
be a problem, but for now I think we should focus on package-specific
solutions, to the extent possible, such as what we discussed for Git, as
well as improvements to our build farm infrastructure.

Thoughts?

Ludo’.

  parent reply	other threads:[~2018-07-11 12:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30 19:34 shortening the git test suite Ricardo Wurmus
2018-06-30 23:52 ` Gábor Boskovits
2018-07-01 13:54 ` Marius Bakke
2018-07-05  9:28   ` Ricardo Wurmus
2018-07-02  4:56 ` Mark H Weaver
2018-07-02  8:39   ` Gábor Boskovits
2018-07-05  9:28     ` Ricardo Wurmus
2018-07-05  8:44 ` Chris Marusich
2018-07-05  9:21   ` Ricardo Wurmus
2018-07-06  9:46     ` Gábor Boskovits
2018-07-06 18:19     ` Mark H Weaver
2018-07-06 21:05       ` Ludovic Courtès
2018-07-07  8:07         ` Gábor Boskovits
2018-07-07 16:44         ` Mark H Weaver
2018-07-07 21:37           ` Ricardo Wurmus
2018-07-08 22:41             ` Mark H Weaver
2018-07-09  7:47               ` Ricardo Wurmus
2018-07-11 12:46           ` Ludovic Courtès [this message]
2018-07-12  9:27           ` Chris Marusich
2018-07-08  1:29         ` Mike Gerwitz
2018-07-06 21:09     ` Automatic branch merging upon build completion Ludovic Courtès

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=87k1q2kkiy.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.org \
    /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).