mirror of
https://git.yoctoproject.org/poky-contrib
synced 2025-05-08 23:52:25 +08:00
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>
This commit is contained in:
parent
48124db7ca
commit
077bf3c410
1
meta-selftest/recipes-test/testrpm/files/testfile.txt
Normal file
1
meta-selftest/recipes-test/testrpm/files/testfile.txt
Normal file
@ -0,0 +1 @@
|
||||
== This file serves the purposes of SRC_URI only
|
18
meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
Normal file
18
meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
Normal file
@ -0,0 +1,18 @@
|
||||
SUMMARY = "Test recipe for testing rpm generated by oe-core"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
LICENSE = "MIT"
|
||||
|
||||
SRC_URI = "file://testfile.txt"
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
do_compile(){
|
||||
echo "testdata" > ${B}/"file with [brackets].txt"
|
||||
echo "testdata" > ${B}/"file with (parentheses).txt"
|
||||
}
|
||||
|
||||
do_install(){
|
||||
install ${B}/* ${D}/
|
||||
}
|
||||
|
||||
FILES:${PN} = "*"
|
14
meta/lib/oeqa/selftest/cases/rpmtests.py
Normal file
14
meta/lib/oeqa/selftest/cases/rpmtests.py
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright OpenEmbedded Contributors
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
from oeqa.selftest.case import OESelftestTestCase
|
||||
from oeqa.utils.commands import bitbake
|
||||
|
||||
class BitbakeTests(OESelftestTestCase):
|
||||
|
||||
def test_rpm_filenames(self):
|
||||
test_recipe = "testrpm"
|
||||
bitbake(test_recipe)
|
Loading…
x
Reference in New Issue
Block a user