Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/tests: allow properly indented config fragment
@ 2017-07-15 22:49 Yann E. MORIN
  2017-07-16  7:18 ` Thomas Petazzoni
  2017-07-18 19:37 ` Arnout Vandecappelle
  0 siblings, 2 replies; 7+ messages in thread
From: Yann E. MORIN @ 2017-07-15 22:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 support/testing/infra/builder.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py
index a475bb0a30..81735dec96 100644
--- a/support/testing/infra/builder.py
+++ b/support/testing/infra/builder.py
@@ -16,7 +16,8 @@ class Builder(object):
 
         config_file = os.path.join(self.builddir, ".config")
         with open(config_file, "w+") as cf:
-            cf.write(self.config)
+            for line in self.config.splitlines():
+                cf.write("{}\n".format(line.lstrip()))
 
         cmd = ["make",
                "O={}".format(self.builddir),
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-18 19:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox