From: ludo@gnu.org (Ludovic Courtès)
To: Eric Bavier <ericbavier@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] utils: Allow wrap-program to be called multiple times.
Date: Sat, 13 Sep 2014 14:20:44 +0200 [thread overview]
Message-ID: <877g17k8yr.fsf@gnu.org> (raw)
In-Reply-To: <87sijw122v.fsf@gmail.com> (Eric Bavier's message of "Sat, 13 Sep 2014 01:12:08 -0500")
Eric Bavier <ericbavier@gmail.com> skribis:
> An updated patch is attached. I changed some of the wording in the
> wrap-program docstring to bring it in a bit more in line with the new
> behavior. Let me know if there should be any more adjustments there. I
> also took the liberty of changing "/nix" to "/gnu". ;)
Good. :-)
>> It would be ideal if a test in tests/build-utils.scm made sure that
>> ‘wrap-program’ uses the right file names when called multiple times,
>> but I won’t object if the patch doesn’t have it.
>
> See the new test included in this patch. Rather than checking for the
> file outputs of wrap-program, it checks for correct behavior of the
> wrapped program. I believe this is more consistent with how
> wrap-program is used, and doesn't tie the test to the implementation.
Right, good idea.
> From 1b09db0a80d94d3a4c798cc6ee811891b34153e1 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Sat, 13 Sep 2014 01:05:03 -0500
> Subject: [PATCH] utils: Allow wrap-program to be called multiple times.
>
> * guix/build/utils.scm (wrap-program): Multiple invocations of
> wrap-program for the same file create successive wrappers. Adjust
> docstring.
> * tests/build-utils.scm: Test new wrap-program behavior.
> (%store): New variable.
Looks good to me. One last thing:
> (define-module (test-build-utils)
> + #:use-module (guix store)
> + #:use-module (guix derivations)
> #:use-module (guix build utils)
> - #:use-module (srfi srfi-64))
> + #:use-module (guix packages)
> + #:use-module (guix build-system)
> + #:use-module (guix build-system trivial)
> + #:use-module (gnu packages)
> + #:use-module (gnu packages bootstrap)
> + #:use-module (srfi srfi-34)
> + #:use-module (srfi srfi-64)
> + #:use-module (rnrs io ports)
> + #:use-module (ice-9 popen))
>
> +(define %store
> + (false-if-exception (open-connection)))
> +
> +(when %store
> + ;; Make sure we build everything by ourselves.
> + (set-build-options %store #:use-substitutes? #f))
These two forms can be replaced with:
(define %store
(open-connection-for-tests))
with the addition of #:use-module (guix tests).
OK to commit with this change.
Thank you!
Ludo’.
next prev parent reply other threads:[~2014-09-13 12:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 22:56 [PATCH] utils: Allow wrap-program to be called multiple times Eric Bavier
2014-09-10 13:40 ` Ludovic Courtès
2014-09-10 19:16 ` Eric Bavier
2014-09-11 13:10 ` Ludovic Courtès
2014-09-13 6:12 ` Eric Bavier
2014-09-13 12:20 ` Ludovic Courtès [this message]
2014-09-14 4:05 ` mhw
2014-09-14 14:27 ` Ludovic Courtès
2014-09-14 15:16 ` Eric Bavier
2014-09-14 15:58 ` Mark H Weaver
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877g17k8yr.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=ericbavier@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.