All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH v4 13/16] osstest: change the meaning of need_build_host
Date: Fri, 7 Jul 2017 12:36:24 +0100	[thread overview]
Message-ID: <20170707113624.ih6ptrvqnhcvkadd@dhcp-3-128.uk.xensource.com> (raw)
In-Reply-To: <22878.22822.131092.839295@mariner.uk.xensource.com>

On Thu, Jul 06, 2017 at 04:37:10PM +0100, Ian Jackson wrote:
> Roger Pau Monne writes ("[PATCH v4 13/16] osstest: change the meaning of need_build_host"):
> > Make need_build_host store a string instead of a boolean. This is
> > later going to be expanded to handle the FreeBSD build jobs.
> ...
> > -    if {$need_build_host} { catching-otherwise broken allocate-build-host }
> > +    if {[llength $need_build_host]} {
> > +        catching-otherwise broken allocate-build-host $need_build_host
> > +    }
> 
> I think you mean
> 
>   +    if {[llength $need_build_host]} {
>   +        catching-otherwise broken { allocate-build-host $need_build_host }
>   +    }
> 
> catching-otherwise takes a script as its second argument.  The script
> can be a whole { } block and can refer to variables in the same scope
> (since it is invoked with uplevel).
> 
> Ie, catching-otherwise is a user-defined control construct.  You can
> use it like "if" or something.  The omission of the braces in the old
> code is simply because if the code to be executed is a single
> argumentless procedure call, they aren't needed.

Heh, I told you I would try to do it the C way ;). Thanks for the
comment, it's now fixed.

> So:
> 
> > -    if {$need_build_host} { catching-otherwise broken prepare-build-host }
> > +    if {[llength $need_build_host]} {
> > +        catching-otherwise broken \
> > +                           prepare-build-host-[string tolower $need_build_host]
> 
> Instead:
> 
>   +        catching-otherwise broken {
>   +            prepare-build-host-[string tolower $need_build_host]
>   +        }
> > +    }
> 
> > -proc need-hosts/build {} { return BUILD }
> > -proc need-hosts/build-kern {} { return BUILD }
> > -proc need-hosts/build-libvirt {} { return BUILD }
> > -proc need-hosts/build-rumprun {} { return BUILD }
> > -proc need-hosts/build-xtf {} { return BUILD }
> > +proc need-hosts/build {} { return BUILD_LINUX }
> > +proc need-hosts/build-kern {} { return BUILD_LINUX }
> > +proc need-hosts/build-libvirt {} { return BUILD_LINUX }
> > +proc need-hosts/build-rumprun {} { return BUILD_LINUX }
> > +proc need-hosts/build-xtf {} { return BUILD_LINUX }
> 
> I wish I had made these line up neatly!  Sorry.

Would you like me to align the '{ return ...' block (align on the
first { of the body).

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-07-07 11:36 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 14:42 [PATCH v4 00/16] osstest: initial FreeBSD support Roger Pau Monne
2017-07-06 14:42 ` [PATCH v4 01/16] osstest: make built_stash_file store a path_ runvar for each file Roger Pau Monne
2017-07-06 14:42 ` [PATCH v4 02/16] osstest: move known_hosts generation to TestSupport Roger Pau Monne
2017-07-06 14:42 ` [PATCH v4 03/16] osstest: introduce helper to get per-host tftp prefix Roger Pau Monne
2017-07-06 14:42 ` [PATCH v4 04/16] osstest: introduce a helper to calculate the sha256 of a given file Roger Pau Monne
2017-07-06 14:43   ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 05/16] osstest: introduce a helper to setup a host to boot using memdisk Roger Pau Monne
2017-07-06 16:07   ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 06/16] osstest: add a FreeBSD host install recipe Roger Pau Monne
2017-07-06 14:53   ` Ian Jackson
2017-07-06 15:13   ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 07/16] osstest: introduce build helpers for FreeBSD Roger Pau Monne
2017-07-06 14:56   ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 08/16] osstest: add support for the FreeBSD package manager Roger Pau Monne
2017-07-06 15:12   ` Ian Jackson
2017-07-07  9:55     ` Roger Pau Monne
2017-07-06 14:42 ` [PATCH v4 09/16] osstest: introduce a FreeBSD build script Roger Pau Monne
2017-07-06 15:25   ` Ian Jackson
2017-07-06 17:11     ` Roger Pau Monne
2017-07-06 17:31       ` Ian Jackson
2017-07-06 17:39         ` Roger Pau Monne
2017-07-06 17:42           ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 10/16] osstest: add support for runtime_IDENT_hostflags Roger Pau Monne
2017-07-06 15:28   ` Ian Jackson
2017-07-06 17:34     ` Roger Pau Monne
2017-07-06 17:42       ` Ian Jackson
2017-07-07 13:07     ` Roger Pau Monne
2017-07-07 13:08       ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 11/16] osstest: introduce a script to set the runtime hostflags runvar for FreeBSD jobs Roger Pau Monne
2017-07-06 15:30   ` Ian Jackson
2017-07-06 16:03   ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 12/16] osstest: allow catching-otherwise to pass arguments to the called script Roger Pau Monne
2017-07-06 15:33   ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 13/16] osstest: change the meaning of need_build_host Roger Pau Monne
2017-07-06 15:37   ` Ian Jackson
2017-07-07 11:36     ` Roger Pau Monne [this message]
2017-07-07 13:00       ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 14/16] osstest: add support for FreeBSD buildjobs to sg-run-job Roger Pau Monne
2017-07-06 15:38   ` Ian Jackson
2017-07-06 14:42 ` [PATCH v4 15/16] osstest: introduce a script to create a FreeBSD flight Roger Pau Monne
2017-07-06 16:04   ` Ian Jackson
2017-07-07 14:39     ` Roger Pau Monne
2017-07-06 14:42 ` [PATCH v4 16/16] osstest: hook FreeBSD flight into cr-daily-branch Roger Pau Monne
2017-07-06 16:10   ` Ian Jackson

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=20170707113624.ih6ptrvqnhcvkadd@dhcp-3-128.uk.xensource.com \
    --to=roger.pau@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.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.
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.