summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2017-07-18 22:38:39 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-18 23:46:09 +0200
commitcf3cd4388a652c9af27ef1c35622e2d0a55b99a9 (patch)
treea0233dd9ac29d0c1dcfc8b5c78fb902f529eadc6 /support
parentbc801efacb298e2297024f83e960eaf8a45dd39f (diff)
downloadbuildroot-cf3cd4388a652c9af27ef1c35622e2d0a55b99a9.tar.gz
buildroot-cf3cd4388a652c9af27ef1c35622e2d0a55b99a9.zip
support/tests: allow properly indented config fragment
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, allowing in-line indented config fragments, like so: class TestFoo(bla): config = bla.config + \ """ FOO=y # BAR is not set """ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support')
-rw-r--r--support/testing/infra/basetest.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 1a082bb441..07c180e232 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -41,6 +41,7 @@ class BRTest(unittest.TestCase):
self.testname = self.__class__.__name__
self.builddir = self.outputdir and os.path.join(self.outputdir, self.testname)
self.emulator = None
+ self.config = '\n'.join([line.lstrip() for line in self.config.splitlines()])
def show_msg(self, msg):
print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
OpenPOWER on IntegriCloud