diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/lib/oeqa/selftest/cases/lic_checksum.py | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/lib/oeqa/selftest/cases/lic_checksum.py')
-rw-r--r-- | poky/meta/lib/oeqa/selftest/cases/lic_checksum.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/poky/meta/lib/oeqa/selftest/cases/lic_checksum.py b/poky/meta/lib/oeqa/selftest/cases/lic_checksum.py new file mode 100644 index 000000000..37407157c --- /dev/null +++ b/poky/meta/lib/oeqa/selftest/cases/lic_checksum.py @@ -0,0 +1,35 @@ +import os +import tempfile + +from oeqa.selftest.case import OESelftestTestCase +from oeqa.utils.commands import bitbake +from oeqa.utils import CommandError +from oeqa.core.decorator.oeid import OETestID + +class LicenseTests(OESelftestTestCase): + + # Verify that changing a license file that has an absolute path causes + # the license qa to fail due to a mismatched md5sum. + @OETestID(1197) + def test_nonmatching_checksum(self): + bitbake_cmd = '-c populate_lic emptytest' + error_msg = 'emptytest: The new md5 checksum is 8d777f385d3dfec8815d20f7496026dc' + + lic_file, lic_path = tempfile.mkstemp() + os.close(lic_file) + self.track_for_cleanup(lic_path) + + self.write_recipeinc('emptytest', """ +INHIBIT_DEFAULT_DEPS = "1" +LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e" +SRC_URI = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e" +""" % (lic_path, lic_path)) + result = bitbake(bitbake_cmd) + + with open(lic_path, "w") as f: + f.write("data") + + self.write_config("INHERIT_remove = \"report-error\"") + result = bitbake(bitbake_cmd, ignore_status=True) + if error_msg not in result.output: + raise AssertionError(result.output) |