Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] support/tests: allow properly indented config fragment
Date: Sun, 16 Jul 2017 10:11:04 +0200	[thread overview]
Message-ID: <20170716081104.GA30047@scaer> (raw)
In-Reply-To: <20170716091807.7ce7e5c5@windsurf>

Thomas, All,

On 2017-07-16 09:18 +0200, Thomas Petazzoni spake thusly:
> On Sun, 16 Jul 2017 00:49:49 +0200, Yann E. MORIN wrote:
> > Currently, defining a config fragment in the runtime test infra requires
> > that the fragment not to be indented. This is beark, and causes grievance
> > when looking at the code (e.g. to fix it).
> > 
> > Just strip out all leading spaces/tabs when writing the configuration
> > lines into the config file.
> 
> Seems good in principle, but could you give an example of an indented
> config fragment you intend to use?

Sure. Here's a diff against master, for example:

    diff --git a/support/testing/tests/fs/test_squashfs.py b/support/testing/tests/fs/test_squashfs.py
    index b205b6a55a..9fad28f834 100644
    --- a/support/testing/tests/fs/test_squashfs.py
    +++ b/support/testing/tests/fs/test_squashfs.py
    @@ -5,12 +5,12 @@ import infra.basetest
     
     class TestSquashfs(infra.basetest.BRTest):
         config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
    -"""
    -BR2_TARGET_ROOTFS_SQUASHFS=y
    -# BR2_TARGET_ROOTFS_SQUASHFS4_GZIP is not set
    -BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y
    -# BR2_TARGET_ROOTFS_TAR is not set
    -"""
    +        """
    +        BR2_TARGET_ROOTFS_SQUASHFS=y
    +        # BR2_TARGET_ROOTFS_SQUASHFS4_GZIP is not set
    +        BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y
    +        # BR2_TARGET_ROOTFS_TAR is not set
    +        """
     
         def test_run(self):
             unsquashfs_cmd = ["host/bin/unsquashfs", "-s", "images/rootfs.squashfs"]

And here is a big file which is easier to read with indented config
fragments:
    https://git.buildroot.org/~ymorin/git/buildroot/tree/support/testing/tests/init/test_systemd.py?h=yem/systemd-skeleton-2

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.  |
'------------------------------^-------^------------------^--------------------'

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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-15 22:49 [Buildroot] [PATCH] support/tests: allow properly indented config fragment Yann E. MORIN
2017-07-16  7:18 ` Thomas Petazzoni
2017-07-16  8:11   ` Yann E. MORIN [this message]
2017-07-18 19:37 ` Arnout Vandecappelle
2017-07-18 19:45   ` Yann E. MORIN
2017-07-18 19:55     ` Arnout Vandecappelle
2017-07-18 19:58       ` Yann E. MORIN

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=20170716081104.GA30047@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