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): | |||
| 117 | if e.errno != errno.ENOENT: | 117 | if e.errno != errno.ENOENT: |
| 118 | raise | 118 | raise |
| 119 | 119 | ||
| 120 | if self.tc.custommachine: | ||
| 121 | machine_conf = 'MACHINE ??= "%s"\n' % self.tc.custommachine | ||
| 122 | self.set_machine_config(machine_conf) | ||
| 123 | |||
| 124 | # tests might need their own setup | 120 | # tests might need their own setup |
| 125 | # but if they overwrite this one they have to call | 121 | # but if they overwrite this one they have to call |
| 126 | # super each time, so let's give them an alternative | 122 | # super each time, so let's give them an alternative |
| @@ -178,19 +174,11 @@ class OESelftestTestCase(OETestCase): | |||
| 178 | self.logger.debug("Writing to: %s\n%s\n" % (dest_path, data)) | 174 | self.logger.debug("Writing to: %s\n%s\n" % (dest_path, data)) |
| 179 | ftools.write_file(dest_path, data) | 175 | ftools.write_file(dest_path, data) |
| 180 | 176 | ||
| 181 | if not multiconfig and self.tc.custommachine and 'MACHINE' in data: | ||
| 182 | machine = get_bb_var('MACHINE') | ||
| 183 | self.logger.warning('MACHINE overridden: %s' % machine) | ||
| 184 | |||
| 185 | def append_config(self, data): | 177 | def append_config(self, data): |
| 186 | """Append to <builddir>/conf/selftest.inc""" | 178 | """Append to <builddir>/conf/selftest.inc""" |
| 187 | self.logger.debug("Appending to: %s\n%s\n" % (self.testinc_path, data)) | 179 | self.logger.debug("Appending to: %s\n%s\n" % (self.testinc_path, data)) |
| 188 | ftools.append_file(self.testinc_path, data) | 180 | ftools.append_file(self.testinc_path, data) |
| 189 | 181 | ||
| 190 | if self.tc.custommachine and 'MACHINE' in data: | ||
| 191 | machine = get_bb_var('MACHINE') | ||
| 192 | self.logger.warning('MACHINE overridden: %s' % machine) | ||
| 193 | |||
| 194 | def remove_config(self, data): | 182 | def remove_config(self, data): |
| 195 | """Remove data from <builddir>/conf/selftest.inc""" | 183 | """Remove data from <builddir>/conf/selftest.inc""" |
| 196 | self.logger.debug("Removing from: %s\n%s\n" % (self.testinc_path, data)) | 184 | self.logger.debug("Removing from: %s\n%s\n" % (self.testinc_path, data)) |
| @@ -249,6 +237,13 @@ class OESelftestTestCase(OETestCase): | |||
| 249 | self.logger.debug("Writing to: %s\n%s\n" % (self.machineinc_path, data)) | 237 | self.logger.debug("Writing to: %s\n%s\n" % (self.machineinc_path, data)) |
| 250 | ftools.write_file(self.machineinc_path, data) | 238 | ftools.write_file(self.machineinc_path, data) |
| 251 | 239 | ||
| 240 | def disable_class(self, classname): | ||
| 241 | destfile = "%s/classes/%s.bbclass" % (self.builddir, classname) | ||
| 242 | os.makedirs(os.path.dirname(destfile), exist_ok=True) | ||
| 243 | self.track_for_cleanup(destfile) | ||
| 244 | self.logger.debug("Creating empty class: %s\n" % (destfile)) | ||
| 245 | ftools.write_file(destfile, "") | ||
| 246 | |||
| 252 | # check does path exist | 247 | # check does path exist |
| 253 | def assertExists(self, expr, msg=None): | 248 | def assertExists(self, expr, msg=None): |
| 254 | if not os.path.exists(expr): | 249 | if not os.path.exists(expr): |
