diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-01 22:36:27 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-02 15:59:07 +0100 |
commit | e2a71c7d25632b67981d80e129aae775ffcda617 (patch) | |
tree | e904667624d5ab182f9d3254bb16a9429878c342 /meta/lib/oeqa/selftest/case.py | |
parent | 7c0d6ee5b196db410992952c0e046712ecc3cfc2 (diff) | |
download | poky-e2a71c7d25632b67981d80e129aae775ffcda617.tar.gz |
selftest/incompatible_lic: Ensure create_sdpx isn't used with the tests
The SPDX class doens't get on well with non-standard licenses. Disable it for
the purposes of this test to avoid errors.
Add a new helper function to the core test code to allow this to be done easily.
(From OE-Core rev: b9fb4c68f2ab5becb0a10418884e09dee93cd247)
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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py index dcad4f76ec..54d90c78ac 100644 --- a/meta/lib/oeqa/selftest/case.py +++ b/meta/lib/oeqa/selftest/case.py | |||
@@ -249,6 +249,13 @@ class OESelftestTestCase(OETestCase): | |||
249 | self.logger.debug("Writing to: %s\n%s\n" % (self.machineinc_path, data)) | 249 | self.logger.debug("Writing to: %s\n%s\n" % (self.machineinc_path, data)) |
250 | ftools.write_file(self.machineinc_path, data) | 250 | ftools.write_file(self.machineinc_path, data) |
251 | 251 | ||
252 | def disable_class(self, classname): | ||
253 | destfile = "%s/classes/%s.bbclass" % (self.builddir, classname) | ||
254 | os.makedirs(os.path.dirname(destfile), exist_ok=True) | ||
255 | self.track_for_cleanup(destfile) | ||
256 | self.logger.debug("Creating empty class: %s\n" % (destfile)) | ||
257 | ftools.write_file(destfile, "") | ||
258 | |||
252 | # check does path exist | 259 | # check does path exist |
253 | def assertExists(self, expr, msg=None): | 260 | def assertExists(self, expr, msg=None): |
254 | if not os.path.exists(expr): | 261 | if not os.path.exists(expr): |