From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/5] support/testing: indent ccache defconfig fragment
Date: Mon, 2 Oct 2017 07:49:06 +0200 [thread overview]
Message-ID: <20171002054906.GB4753@scaer> (raw)
In-Reply-To: <59d190611082_6a703fce1402c66055394@ultri3.mail>
Ricardo, All,
On 2017-10-01 22:03 -0300, Ricardo Martincoski spake thusly:
> On Fri, Sep 29, 2017 at 05:17 AM, Yann E. MORIN wrote:
> > On 2017-09-28 23:27 -0300, Ricardo Martincoski spake thusly:
> >> Postpone the strip out of leading spaces in defconfig fragments from the
> >> __init__ to the setUp method. It allows test cases to post-process the
> >> defconfig in their own __init__ before calling the __init__ method from
> >> the base class.
> >
> > Ideally, this should have been the very first patch in the series.
>
> Good idea. I will do, but...
>
> >
> >> Indent the only fragment in the tree that currently need this (in the
> >> ccache test case), taking advantage of
> >> "cf3cd4388a support/tests: allow properly indented config fragment".
> >
> > And then that wcould have gone in the other patch without any issue.
>
> It should. But the reordering shows the jlevel handling is fragile.
>
> Both the rootfs overlay and yaffs2 tests currently have defconfig fragments that
> don't end in a newline, so the new patch 1 ends up silently disabling jlevel:
> ...s/core/rootfs-overlay2"BR2_JLEVEL=1
> BR2_TARGET_ROOTFS_YAFFS2=yBR2_JLEVEL=1
Weird, because on line 46, we explicitly add a trainling '\n' :
https://git.buildroot.org/buildroot/tree/support/testing/infra/basetest.py#n45
45: self.config = '\n'.join([line.lstrip() for line in
self.config.splitlines()]) + '\n'
46: self.config += "BR2_JLEVEL={}\n".format(self.jlevel)
> So I plan to add another patch before the series, to make jlevel handling more
> robust (to other changes in the infra) and at same time use the same style.
> self.config += \
> """
> BR2_JLEVEL={}
> """.format(self.jlevel)
Well, I doubt this is useful. Just prepend a \n, if it really is useful :
self.config += "\nBR2_JLEVEL={}\n".format(self.jlevel)
> It also made me realize that this patch implies that I need to resend another
> one (tests for the git downloader) since there I override the setUp method.
> http://patchwork.ozlabs.org/patch/806161/
> I would need to duplicate there the logic to remove the indentation of defconfig
> fragments.
>
> Perhaps instead of moving the logic to the setUp of BRTest I could move it to
> the builder init. This way any new test class that reimplements setUp and uses
> builder will "inherit" it. Those that reimplement setUp but don't use builder
> don't need that code.
> class Builder(object):
> def __init__(self, config, builddir, logtofile):
> self.config = '\n'.join([line.lstrip() for line in
> config.splitlines()]) + '\n'
> What do you think?
Yes, that would probably be better.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2017-10-02 5:49 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 2:27 [Buildroot] [PATCH 1/5] support/testing: standardize defconfig fragments style Ricardo Martincoski
2017-09-29 2:27 ` [Buildroot] [PATCH 2/5] support/testing: indent ccache defconfig fragment Ricardo Martincoski
2017-09-29 8:17 ` Yann E. MORIN
2017-10-02 1:03 ` Ricardo Martincoski
2017-10-02 5:49 ` Yann E. MORIN [this message]
2017-10-02 23:03 ` Ricardo Martincoski
2017-09-29 2:27 ` [Buildroot] [PATCH 3/5] support/testing: fix code style Ricardo Martincoski
2017-09-29 8:21 ` Yann E. MORIN
2017-09-29 2:27 ` [Buildroot] [PATCH 4/5] support/testing: fix remaining " Ricardo Martincoski
2017-09-29 8:04 ` Yann E. MORIN
2017-09-29 8:29 ` Yann E. MORIN
2017-10-02 1:09 ` Ricardo Martincoski
2017-10-02 6:06 ` Yann E. MORIN
2017-10-02 13:48 ` Arnout Vandecappelle
2017-10-02 14:20 ` Peter Korsgaard
2017-09-29 2:27 ` [Buildroot] [PATCH 5/5] testing/tests/init: use lowercase method names Ricardo Martincoski
2017-09-29 8:23 ` Yann E. MORIN
2017-09-29 8:13 ` [Buildroot] [PATCH 1/5] support/testing: standardize defconfig fragments style Yann E. MORIN
2017-09-29 8:15 ` Yann E. MORIN
2017-10-05 21:42 ` [Buildroot] [PATCH v2 1/6] support/testing: allow to indent ccache defconfig fragment Ricardo Martincoski
2017-10-05 21:42 ` [Buildroot] [PATCH v2 2/6] support/testing: standardize defconfig fragments style Ricardo Martincoski
2017-10-05 21:42 ` [Buildroot] [PATCH v2 3/6] support/testing: fix code style Ricardo Martincoski
2017-10-05 21:42 ` [Buildroot] [PATCH v2 4/6] testing/tests/init: use lowercase method names Ricardo Martincoski
2017-10-06 17:09 ` Arnout Vandecappelle
2017-10-05 21:42 ` [Buildroot] [PATCH v2 5/6] .flake8: add config file for Python code style Ricardo Martincoski
2017-10-06 17:10 ` Arnout Vandecappelle
2017-10-05 21:42 ` [Buildroot] [PATCH v2 6/6] support/testing: fix remaining " Ricardo Martincoski
2017-10-06 17:16 ` Arnout Vandecappelle
2017-10-23 2:30 ` Ricardo Martincoski
2017-10-23 8:34 ` Arnout Vandecappelle
2017-10-29 4:03 ` Ricardo Martincoski
2017-10-29 20:20 ` Arnout Vandecappelle
2017-10-06 17:07 ` [Buildroot] [PATCH v2 1/6] support/testing: allow to indent ccache defconfig fragment Arnout Vandecappelle
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=20171002054906.GB4753@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.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