diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/case.py')
-rw-r--r-- | meta/lib/oeqa/selftest/case.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py index dcad4f76ec..da35b25f68 100644 --- a/meta/lib/oeqa/selftest/case.py +++ b/meta/lib/oeqa/selftest/case.py @@ -117,10 +117,6 @@ class OESelftestTestCase(OETestCase): if e.errno != errno.ENOENT: raise - if self.tc.custommachine: - machine_conf = 'MACHINE ??= "%s"\n' % self.tc.custommachine - self.set_machine_config(machine_conf) - # tests might need their own setup # but if they overwrite this one they have to call # super each time, so let's give them an alternative @@ -178,19 +174,11 @@ class OESelftestTestCase(OETestCase): self.logger.debug("Writing to: %s\n%s\n" % (dest_path, data)) ftools.write_file(dest_path, data) - if not multiconfig and self.tc.custommachine and 'MACHINE' in data: - machine = get_bb_var('MACHINE') - self.logger.warning('MACHINE overridden: %s' % machine) - def append_config(self, data): """Append to <builddir>/conf/selftest.inc""" self.logger.debug("Appending to: %s\n%s\n" % (self.testinc_path, data)) ftools.append_file(self.testinc_path, data) - if self.tc.custommachine and 'MACHINE' in data: - machine = get_bb_var('MACHINE') - self.logger.warning('MACHINE overridden: %s' % machine) - def remove_config(self, data): """Remove data from <builddir>/conf/selftest.inc""" self.logger.debug("Removing from: %s\n%s\n" % (self.testinc_path, data)) @@ -249,6 +237,13 @@ class OESelftestTestCase(OETestCase): self.logger.debug("Writing to: %s\n%s\n" % (self.machineinc_path, data)) ftools.write_file(self.machineinc_path, data) + def disable_class(self, classname): + destfile = "%s/classes/%s.bbclass" % (self.builddir, classname) + os.makedirs(os.path.dirname(destfile), exist_ok=True) + self.track_for_cleanup(destfile) + self.logger.debug("Creating empty class: %s\n" % (destfile)) + ftools.write_file(destfile, "") + # check does path exist def assertExists(self, expr, msg=None): if not os.path.exists(expr): |