diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2019-09-23 13:21:37 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-27 13:01:17 +0100 |
commit | a424ef0a0c49123f4518e8fef993fd10f6fc5f4e (patch) | |
tree | 7058c34acce96749c19ff4f2cebdb446afee5042 /meta/lib/oeqa/selftest/case.py | |
parent | 7ed7dc39e379c18f757e3c326ec1466c8ab27b41 (diff) | |
download | openembedded-core-a424ef0a0c49123f4518e8fef993fd10f6fc5f4e.tar.gz |
oeqa: Test multiconfig parsing
Add a test to verify that when multiconfig conf files changed, recipes
are correctly reparsed.
[YOCTO #13541]
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/case.py')
-rw-r--r-- | meta/lib/oeqa/selftest/case.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py index d207a0af0c..ac3308d8a4 100644 --- a/meta/lib/oeqa/selftest/case.py +++ b/meta/lib/oeqa/selftest/case.py @@ -193,13 +193,20 @@ to ensure accurate results.") self.logger.debug("Adding path '%s' to be cleaned up when test is over" % path) self._track_for_cleanup.append(path) - def write_config(self, data): - """Write to <builddir>/conf/selftest.inc""" + def write_config(self, data, multiconfig=None): + """Write to config file""" + if multiconfig: + multiconfigdir = "%s/conf/multiconfig" % self.builddir + os.makedirs(multiconfigdir, exist_ok=True) + dest_path = '%s/%s.conf' % (multiconfigdir, multiconfig) + self.track_for_cleanup(dest_path) + else: + dest_path = self.testinc_path - self.logger.debug("Writing to: %s\n%s\n" % (self.testinc_path, data)) - ftools.write_file(self.testinc_path, data) + self.logger.debug("Writing to: %s\n%s\n" % (dest_path, data)) + ftools.write_file(dest_path, data) - if self.tc.custommachine and 'MACHINE' in data: + if not multiconfig and self.tc.custommachine and 'MACHINE' in data: machine = get_bb_var('MACHINE') self.logger.warning('MACHINE overridden: %s' % machine) |