From: Simon Tournier <zimon.toutoune@gmail.com>
To: Josselin Poiret <dev@jpoiret.xyz>,
"Dr. Arne Babenhauserheide" <arne_bab@web.de>,
guix-devel@gnu.org
Subject: Re: Caching test results separately?
Date: Tue, 14 Mar 2023 12:03:56 +0100 [thread overview]
Message-ID: <86r0tr1tnn.fsf@gmail.com> (raw)
In-Reply-To: <871qlsi97h.fsf@jpoiret.xyz>
Hi,
On Mon, 13 Mar 2023 at 23:21, Josselin Poiret <dev@jpoiret.xyz> wrote:
>> (⇒ keep the test result (boolean) longer than the build result)
[...]
> As it stands it's really not possible, as
>
> 1) testing is part of the build process itself and
> 2) we can't look-up any stateful info like this from the building
> process (of course!)
Indeed, the builder derivation is not the same and so the item is not
the same.
--8<---------------cut here---------------start------------->8---
$ guix build hello --no-grafts
/gnu/store/s5pd3rnzymliafb4la5sca63j86xs0y0-hello-2.12.1
$ guix build hello --no-grafts --without-tests=hello
/gnu/store/0h3d2z53xx2idy6pnqa8k781hlf40zmx-hello-2.12.1
--8<---------------cut here---------------end--------------->8---
Compare,
/gnu/store/s5y2w04jiydki5wb0zb9189x88v5288s-hello-2.12.1-builder
/gnu/store/d5asvb7mla28mf93hjrk6fffnx14n8b1-hello-2.12.1-builder
(quote
())
#:out-of-source? #f #:tests? #t
(quote
())
#:out-of-source? #f #:tests? #f
Last, note the self reference,
--8<---------------cut here---------------start------------->8---
$ diff -r --no-dereference \
$(guix build hello --no-grafts) \
$(guix build hello --no-grafts --without-tests=hello)
Binary files
/gnu/store/s5pd3rnzymliafb4la5sca63j86xs0y0-hello-2.12.1/bin/hello and
/gnu/store/0h3d2z53xx2idy6pnqa8k781hlf40zmx-hello-2.12.1/bin/hello
differ
$ grep s5pd3rnzymliafb4la5sca63j86xs0y0 $(guix build hello --no-grafts)/bin/hello
grep: /gnu/store/s5pd3rnzymliafb4la5sca63j86xs0y0-hello-2.12.1/bin/hello: binary file matches
$ grep 0h3d2z53xx2idy6pnqa8k781hlf40zmx $(guix build hello --no-grafts --without-tests=hello)/bin/hello
grep: /gnu/store/0h3d2z53xx2idy6pnqa8k781hlf40zmx-hello-2.12.1/bin/hello: binary file matches
--8<---------------cut here---------------end--------------->8---
> But I would really like for tests to move out of build phases, the
> advantages would be twofold: less build time for a lot of packages, and
> better environment management for tests (we could rely on better
> interaction with other packages, more complicated mocking, use linux
> namespaces to their fullest extent, etc.). That would require a huge
> change to Guix though, so it's more of a dream than anything concrete.
I agree:
+ it would simplify many things if we were able to run or re-run
specific phases – Nix does that I guess.
+ it would be huge complex change. :-)
Well, similarly of the ’without-tests’ transformation, maybe we could
imagine another transformation for just run the test suite. I mean, it
would not solve Arne’s issue but the converse: sometimes a package
requiring many compilation is failing because of one test and debugging
that is for some cases painful.
Cheers,
simon
next prev parent reply other threads:[~2023-03-14 11:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 18:31 Caching test results separately? Dr. Arne Babenhauserheide
2023-03-13 22:21 ` Josselin Poiret
2023-03-13 22:44 ` Ryan Prior
2023-03-13 23:10 ` Towards generalized testing (Was: Caching test results separately?) Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-03-14 11:03 ` Simon Tournier [this message]
2023-03-16 14:08 ` Caching test results separately? 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=86r0tr1tnn.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=arne_bab@web.de \
--cc=dev@jpoiret.xyz \
--cc=guix-devel@gnu.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).