summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/case.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/case.py')
-rw-r--r--meta/lib/oeqa/selftest/case.py17
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.")
193 self.logger.debug("Adding path '%s' to be cleaned up when test is over" % path) 193 self.logger.debug("Adding path '%s' to be cleaned up when test is over" % path)
194 self._track_for_cleanup.append(path) 194 self._track_for_cleanup.append(path)
195 195
196 def write_config(self, data): 196 def write_config(self, data, multiconfig=None):
197 """Write to <builddir>/conf/selftest.inc""" 197 """Write to config file"""
198 if multiconfig:
199 multiconfigdir = "%s/conf/multiconfig" % self.builddir
200 os.makedirs(multiconfigdir, exist_ok=True)
201 dest_path = '%s/%s.conf' % (multiconfigdir, multiconfig)
202 self.track_for_cleanup(dest_path)
203 else:
204 dest_path = self.testinc_path
198 205
199 self.logger.debug("Writing to: %s\n%s\n" % (self.testinc_path, data)) 206 self.logger.debug("Writing to: %s\n%s\n" % (dest_path, data))
200 ftools.write_file(self.testinc_path, data) 207 ftools.write_file(dest_path, data)
201 208
202 if self.tc.custommachine and 'MACHINE' in data: 209 if not multiconfig and self.tc.custommachine and 'MACHINE' in data:
203 machine = get_bb_var('MACHINE') 210 machine = get_bb_var('MACHINE')
204 self.logger.warning('MACHINE overridden: %s' % machine) 211 self.logger.warning('MACHINE overridden: %s' % machine)
205 212