diff options
| author | Mingli Yu <mingli.yu@windriver.com> | 2025-04-27 10:39:26 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-04-26 20:00:55 -0700 |
| commit | 93e03bcfd847f5987a21dbe6a6a25d5fe1cfc1a4 (patch) | |
| tree | 2b236b44bf22942cca104c343312df9454d1d8d3 /meta-python | |
| parent | a45637fe2adc3e731894c64efc267e1e5aeb45b0 (diff) | |
| download | meta-openembedded-93e03bcfd847f5987a21dbe6a6a25d5fe1cfc1a4.tar.gz | |
python3-pykickstart: Add ptest support
# ./run-ptest
PASS: tests/commands/test_authconfig.py:FC3_TestCase.runTest
PASS: tests/commands/test_authconfig.py:F28_TestCase.runTest
PASS: tests/commands/test_authconfig.py:F35_TestCase.runTest
PASS: tests/commands/test_authselect.py:F28_TestCase.runTest
PASS: tests/commands/test_autopart.py:AutoPart_TestCase.runTest
PASS: tests/commands/test_autopart.py:FC3_TestCase.runTest
PASS: tests/commands/test_autopart.py:F9_TestCase.runTest
PASS: tests/commands/test_autopart.py:F12_TestCase.runTest
[snip]
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
| -rwxr-xr-x | meta-python/recipes-extended/python-pykickstart/files/run-ptest | 3 | ||||
| -rw-r--r-- | meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.63.bb | 18 |
2 files changed, 20 insertions, 1 deletions
diff --git a/meta-python/recipes-extended/python-pykickstart/files/run-ptest b/meta-python/recipes-extended/python-pykickstart/files/run-ptest new file mode 100755 index 0000000000..289e68b054 --- /dev/null +++ b/meta-python/recipes-extended/python-pykickstart/files/run-ptest | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | pytest --automake --deselect tests/test_packages.py::AddGroupsAndEnvironment_TestCase --deselect tests/commands/test_reboot.py::Reboot_TestCase | ||
diff --git a/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.63.bb b/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.63.bb index bd20c69980..c701e361b7 100644 --- a/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.63.bb +++ b/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.63.bb | |||
| @@ -4,18 +4,34 @@ LICENSE = "GPL-2.0-or-later" | |||
| 4 | 4 | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=81bcece21748c91ba9992349a91ec11d" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=81bcece21748c91ba9992349a91ec11d" |
| 6 | 6 | ||
| 7 | inherit python_setuptools_build_meta | 7 | inherit python_setuptools_build_meta ptest |
| 8 | 8 | ||
| 9 | RDEPENDS:${PN} = "python3 \ | 9 | RDEPENDS:${PN} = "python3 \ |
| 10 | python3-requests \ | 10 | python3-requests \ |
| 11 | python3-six \ | 11 | python3-six \ |
| 12 | " | 12 | " |
| 13 | 13 | ||
| 14 | RDEPENDS:${PN}-ptest += " \ | ||
| 15 | python3-pytest \ | ||
| 16 | python3-unittest-automake-output \ | ||
| 17 | " | ||
| 18 | |||
| 19 | do_install_ptest() { | ||
| 20 | install -d ${D}${PTEST_PATH}/tests | ||
| 21 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests | ||
| 22 | for file in `grep -Rl unittest.main ${D}${PTEST_PATH}/tests/`; do | ||
| 23 | dirname=`dirname $file` | ||
| 24 | basename=`basename $file` | ||
| 25 | [ $basename != "__init__.py" ] && mv $file ${dirname}/test_${basename} | ||
| 26 | done | ||
| 27 | } | ||
| 28 | |||
| 14 | SRC_URI = "git://github.com/rhinstaller/pykickstart.git;protocol=https;branch=master;tag=r${PV} \ | 29 | SRC_URI = "git://github.com/rhinstaller/pykickstart.git;protocol=https;branch=master;tag=r${PV} \ |
| 15 | file://0001-support-authentication-for-kickstart.patch \ | 30 | file://0001-support-authentication-for-kickstart.patch \ |
| 16 | file://0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch \ | 31 | file://0002-pykickstart-parser.py-add-lock-for-readKickstart-and.patch \ |
| 17 | file://0003-comment-out-sections-shutdown-and-environment-in-gen.patch \ | 32 | file://0003-comment-out-sections-shutdown-and-environment-in-gen.patch \ |
| 18 | file://0004-load.py-retry-to-invoke-request-with-timeout.patch \ | 33 | file://0004-load.py-retry-to-invoke-request-with-timeout.patch \ |
| 34 | file://run-ptest \ | ||
| 19 | " | 35 | " |
| 20 | SRCREV = "6e0d1238cb4696a9040072a5a28a706e5775c552" | 36 | SRCREV = "6e0d1238cb4696a9040072a5a28a706e5775c552" |
| 21 | 37 | ||
