summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorPaulo Neves <ptsneves@gmail.com>2022-02-06 14:45:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-19 14:14:11 +0100
commit15df00f0f0e3c15560b3f0774227817deade81f9 (patch)
tree203392fe7962d0ce3ed78c1e7dbdef3147c287dd /meta/lib
parentcaea484eb828cf90e63b69680c087a739ac343fa (diff)
downloadpoky-15df00f0f0e3c15560b3f0774227817deade81f9.tar.gz
selftest/lic_checksum: Add test for filename containing space
A fix is being added to bitbake to correctly handle spaces inside checksum filenames. Add a test to oe-selftest to ensure this is tested and doesn't regress in future. (From OE-Core rev: 324109f034f069ee3e91a1a705b3449911a448de) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/lic_checksum.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/lic_checksum.py b/meta/lib/oeqa/selftest/cases/lic_checksum.py
index f8681ed755..8f1226e6a5 100644
--- a/meta/lib/oeqa/selftest/cases/lic_checksum.py
+++ b/meta/lib/oeqa/selftest/cases/lic_checksum.py
@@ -4,12 +4,30 @@
4 4
5import os 5import os
6import tempfile 6import tempfile
7import urllib
7 8
8from oeqa.selftest.case import OESelftestTestCase 9from oeqa.selftest.case import OESelftestTestCase
9from oeqa.utils.commands import bitbake 10from oeqa.utils.commands import bitbake
10 11
11class LicenseTests(OESelftestTestCase): 12class LicenseTests(OESelftestTestCase):
12 13
14 def test_checksum_with_space(self):
15 bitbake_cmd = '-c populate_lic emptytest'
16
17 lic_file, lic_path = tempfile.mkstemp(" -afterspace")
18 os.close(lic_file)
19 #self.track_for_cleanup(lic_path)
20
21 self.write_config("INHERIT:remove = \"report-error\"")
22
23 self.write_recipeinc('emptytest', """
24INHIBIT_DEFAULT_DEPS = "1"
25LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"
26SRC_URI = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"
27""" % (urllib.parse.quote(lic_path), urllib.parse.quote(lic_path)))
28 result = bitbake(bitbake_cmd)
29
30
13 # Verify that changing a license file that has an absolute path causes 31 # Verify that changing a license file that has an absolute path causes
14 # the license qa to fail due to a mismatched md5sum. 32 # the license qa to fail due to a mismatched md5sum.
15 def test_nonmatching_checksum(self): 33 def test_nonmatching_checksum(self):