diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/lic_checksum.py | 18 |
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 | ||
5 | import os | 5 | import os |
6 | import tempfile | 6 | import tempfile |
7 | import urllib | ||
7 | 8 | ||
8 | from oeqa.selftest.case import OESelftestTestCase | 9 | from oeqa.selftest.case import OESelftestTestCase |
9 | from oeqa.utils.commands import bitbake | 10 | from oeqa.utils.commands import bitbake |
10 | 11 | ||
11 | class LicenseTests(OESelftestTestCase): | 12 | class 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', """ | ||
24 | INHIBIT_DEFAULT_DEPS = "1" | ||
25 | LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e" | ||
26 | SRC_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): |