unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Phil <phil@beadling.co.uk>
To: raingloom <raingloom@riseup.net>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Getting Unit Test Results Out Of Guix Build
Date: Fri, 05 Nov 2021 01:53:17 +0000	[thread overview]
Message-ID: <87mtmj5pwy.fsf@beadling.co.uk> (raw)
In-Reply-To: <20211105021503.4ba68ba9@riseup.net>

Hi,

raingloom writes:

> The --dry-run option is the closest thing that I know of. Not sure what
> its Scheme equivalent is.

Thanks yes - I think this suffers from a similar issue to my own
approach in that when a build fails, the store item is removed, along
with the test results contained within.  So getting the directory was
only half the battle.  In this case you could use "-K" and have
separate logic to deal with success (using a new output) and failure
(trawl /tmp for the results) but this strikes me as too
complicated. "-K" won't work with build offloading either.

And alternative approach I have been looking at is (carefully) using
--chroot-directory option on the daemon.  It's not ideal as it risks a
leaky container, but an extra directory can added to the build container
for the sole purpose of test results.  It seems to me if I make the
directory owned-by but read-only to my build pipeline account (which
calls guix and collects the results), and give the directory a group id
of guixbuild, but make the group write-only, then I can have a situation
where the extra directory doesn't pollute the container, allowing build
artifacts to flow outwards only, with no files being able to flow into
the build.

The problem I see with this is if (like me) you have a machines.scm
offloading builds you need a way of retrieving the artifacts off the
remote workers (I am assuming they won't sync automatically, but haven't
yet tested).  A crude solution to this is simply to NFS mount or similar
the chroot'ed directory so each worker shares the same directory.

Any more comments/ideas welcome - I'll report back if I get something
palatable working.


      reply	other threads:[~2021-11-05  1:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 12:30 Getting Unit Test Results Out Of Guix Build Phil Beadling
2021-10-26  4:24 ` raingloom
2021-10-26 18:31   ` Phil
2021-11-04 13:52     ` Phil Beadling
2021-11-05  1:15       ` raingloom
2021-11-05  1:53         ` Phil [this message]

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=87mtmj5pwy.fsf@beadling.co.uk \
    --to=phil@beadling.co.uk \
    --cc=help-guix@gnu.org \
    --cc=raingloom@riseup.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.
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).