All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: wei.liu2@citrix.com, Ian Jackson <Ian.Jackson@eu.citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] OSSTEST: introduce a raisin build test
Date: Wed, 6 May 2015 12:45:34 +0100	[thread overview]
Message-ID: <1430912734.2660.258.camel@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1505061208510.2640@kaball.uk.xensource.com>

On Wed, 2015-05-06 at 12:16 +0100, Stefano Stabellini wrote:
> On Wed, 6 May 2015, Ian Campbell wrote:
> > On Tue, 2015-05-05 at 18:47 +0100, Stefano Stabellini wrote:
> > > > I was suggesting ts-raisin-build could contain just 1. a call to raise
> > > > to list all the relevant trees 2. an iteration over the output,
> > > > copying information to/from runvars, 3. an exception table to allow
> > > > for situations like 'QEMU' ne uc 'qemuu' and 'QEMU_TRADITIONAL' ne uc
> > > > 'qemuu'.
> > > 
> > > raisin does not have a list of trees, if not in the form of a default
> > > config file provided for users' convenience. Theoretically
> > > ts-raisin-build could use the default config and grep _URL
> > > raisin/defconfig, but I think it would be uglier than the current
> > > approach.
> > > 
> > > Keep in mind that with raisin there is no hidden git cloning of external
> > > trees. Not at all. All the trees are specified in the config file and
> > > cloned explicitly. Actually I think that it is nice and natural for
> > > ts-raisin-build to specify a list of URLs, because ts-raisin-build also
> > > wants to specify which components raisin is supposed to build and there
> > > is a 1:1 relationship.
> > 
> > I think a simple mapping from "osstest tree names" to "raisin
> > components", (or vice versa, but the rest of the mail assumes the
> > former) ought to be all which is needed here.
> > 
> > Essentially you want to iterate over the runvars looks for things which
> > match tree_(.*) then (modulo proper Perl syntax):
> > 
> >         my $tree = $1;
> >      my $comp = $osstest2raisin{$tree}
> >         push @components, $comp;
> >         
> >         echo >> config "uc($comp)_URL=$r{tree_${tree}}"
> >         echo >> config "uc($comp)_REVISION=$r{revision_${tree}}"
> > 
> > Finally
> >         my $comps = join(", ", @components);
> >         
> >         echo >> config "COMPONENTS=$comps"
> > 
> > I'm assuming that in raisin the component name is consistently also the
> > first part of the _URL and _REVISION config options, if not then %
> > osstest2raisin would need to be a hash exploding to the various required
> > names.
> 
> Not a problem, names are consistent in raisin.
> But is that much better than

This omits generating $ENABLED_COMPONENTS from the set of things which
osstest asked for.

Doing that is only incrementally more complex with what I suggested
(i.e. fits in nicely), but much more for the version below, (i.e. I
think it would basically look like what I suggested anyway).

>     echo >>config XEN_URL=\\"$r{tree_xen}\\"
>     echo >>config QEMU_URL=\\"$r{tree_qemuu}\\"
>     echo >>config QEMU_TRADITIONAL_URL=\\"$r{tree_qemu}\\"
>     echo >>config SEABIOS_URL=\\"$r{tree_seabios}\\"
>     echo >>config LIBVIRT_URL=\\"$r{tree_libvirt}\\"
>     echo >>config OVMF_URL=\\"$r{tree_ovmf}\\"
> 
>     echo >>config XEN_REVISION=\\"$r{revision_xen}\\"
>     echo >>config QEMU_REVISION=\\"$r{revision_qemuu}\\"
>     echo >>config QEMU_TRADITIONAL_REVISION=\\"$r{revision_qemu}\\"
>     echo >>config SEABIOS_REVISION=\\"$r{revision_seabios}\\"
>     echo >>config LIBVIRT_REVISION=\\"$r{revision_libvirt}\\"
>     echo >>config OVMF_REVISION=\\"$r{revision_ovmf}\\"
> 
> ? This is comparable in lines of code, and much more obvious to the
> reader.
> 
> Also it wouldn't fetch the urls from raisin as Ian suggested. That bit
> is the part that I would prefer to avoid.

I think with the scheme I proposed osstest always picks the precise set
of components and their URL so this wouldn't be necessary.

What Ian suggested only becomes necessary if raisin can clone/build
something which wasn't specified explicitly, which I think you said
wasn't the case? I think that relies on $ENABLED_COMPONENTS accurately
reflecting the input runvars?

What happens if ENABLED_COMPONENTS contains e.g. libvirt but
LIBVIRT_{URL,REVISION} are not specified in the config?

Ian.

  reply	other threads:[~2015-05-06 11:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 15:46 [PATCH] OSSTEST: introduce a raisin build test Stefano Stabellini
2015-05-05 11:57 ` Ian Campbell
2015-05-05 14:59   ` Ian Jackson
2015-05-05 16:49     ` Stefano Stabellini
2015-05-05 17:17       ` Ian Jackson
2015-05-05 17:47         ` Stefano Stabellini
2015-05-06  8:41           ` Ian Campbell
2015-05-06 11:16             ` Stefano Stabellini
2015-05-06 11:45               ` Ian Campbell [this message]
2015-05-05 17:53   ` Stefano Stabellini
2015-05-06 10:09     ` Ian Jackson
2015-05-06 11:03       ` Stefano Stabellini
2015-05-06 16:11         ` Antti Kantee

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=1430912734.2660.258.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.