Fedora 21 Alpha validation test work

Eric Blake eblake at redhat.com
Tue Jul 29 13:13:59 UTC 2014

On 07/29/2014 01:57 AM, Adam Williamson wrote:
> On Mon, 2014-07-28 at 09:16 -0400, Kamil Paral wrote:
>>> Hah - when i was two paragraphs into your mail, I started thinking 'hmm,
>>> we could amend the Result template' :P - great minds think alike, it
>>> seems...
>>> In a way it'd be cleaner to have the image as part of the template, but
>>> then you'd have to 'pad' the entry like this:
>>> {{result|pass|adamwill||||TC1}}
>> If you think it's better to have it as a part of the template (probably is), let's change to order:
>> {{result|pass|adamwill|TC1}}
>> {{result|fail|adamwill|TC1|123456}}
>> {{result|fail|adamwill|TC1|123456|111222}}
>> I think that's no less readable than the original schema.
> It isn't at all, but it has the rather large problem that it breaks the
> API :) All existing {{result}} entries in all pages will be invalid.
> That seems like a deal-breaker. We're kind of locked forever into the
> first five fields being 'result', 'username', 'bug#', 'bug#', 'bug#', I
> think, to preserve existing results.

Wiki templates allow named parameters, so you could do something like:

{{result| result=pass | user=adamwill | target=TC1 | bug1=123456}}

if we were to merely rewrite
https://fedoraproject.org/wiki/Template:Result to use named parameters
when present, and fall back to positional parameters when the named
slots were not provided.

>> I haven't studied the templating markup language too much, but I doubt
>> you can express such programming structures in there.
> I had a quick look and I suspect you can, but it'd get really pretty
> messy.

Heuristics are indeed possible, but you are right that it gets messy.
For example, where the template currently does

{{#if: {{{3|}}} |{{#tag:ref|{{bz|{{{3}}}}}|name=bz{{{3}}}}}

we'd have to come up with some complicated {{#if:}} condition that tests
whether {{{bug1|}}} and/or {{{target|}}} exists (new-style invocation,
use bug1 or nothing) or is empty (old-style invocation, use {{{3|}}} as
a bug number).

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/test/attachments/20140729/7ebaeefc/attachment.sig>

More information about the test mailing list