diff options
author | Pavel Zhukov <pavel@zhukoff.net> | 2022-08-19 15:15:38 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-21 22:51:42 +0100 |
commit | 077bf3c410bf0df9a6709be6403a87b230c294f5 (patch) | |
tree | 5b030a9123cfdd0214c0ce456d9905c7b6f5d180 /meta-selftest/recipes-test/testrpm | |
parent | 48124db7ca06e9fd8879a2ff0d70f7ea63acfa37 (diff) | |
download | poky-077bf3c410bf0df9a6709be6403a87b230c294f5.tar.gz |
selftest: Add regression test for rpm filesnames
Escaping globs and quoting in rpm spec files is tricky and requires a
bit of dancing. In addition to that it changes from time to time.
Adding (simple) regression test for different types of filename
patterns. Cover brackets and parentheses in first iteration
[Yocto #13746]
(From OE-Core rev: 142432217c152970249884fad240f7441cb1a2ad)
Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/recipes-test/testrpm')
-rw-r--r-- | meta-selftest/recipes-test/testrpm/files/testfile.txt | 1 | ||||
-rw-r--r-- | meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/testrpm/files/testfile.txt b/meta-selftest/recipes-test/testrpm/files/testfile.txt new file mode 100644 index 0000000000..c4d7630c1e --- /dev/null +++ b/meta-selftest/recipes-test/testrpm/files/testfile.txt | |||
@@ -0,0 +1 @@ | |||
== This file serves the purposes of SRC_URI only | |||
diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb new file mode 100644 index 0000000000..5e8761ab55 --- /dev/null +++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "Test recipe for testing rpm generated by oe-core" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | SRC_URI = "file://testfile.txt" | ||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | do_compile(){ | ||
10 | echo "testdata" > ${B}/"file with [brackets].txt" | ||
11 | echo "testdata" > ${B}/"file with (parentheses).txt" | ||
12 | } | ||
13 | |||
14 | do_install(){ | ||
15 | install ${B}/* ${D}/ | ||
16 | } | ||
17 | |||
18 | FILES:${PN} = "*" | ||