]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libsolv: ptest: remove conditional checks
authorPratik Farkase <pratik.farkase@est.tech>
Wed, 11 Feb 2026 16:35:14 +0000 (17:35 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Feb 2026 17:27:31 +0000 (17:27 +0000)
Simplify run-ptest and do_install_ptest by removing conditional
checks. If upstream renames or relocates test files, the build should
fail explicitly rather than silently skipping tests, ensuring the
recipe is updated appropriately.

Changes:
  - Use testcases/* glob to automatically discover all test suites
  - Remove file existence checks from run-ptest
  - Remove file existence checks from do_install_ptest

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/libsolv/libsolv/run-ptest
meta/recipes-extended/libsolv/libsolv_0.7.35.bb

index 1462aecd61e77f94f8749a512c67e0af91d35545..857b719ae5ffa033086cb0a8e8246d884b767e9a 100755 (executable)
@@ -2,20 +2,11 @@
 
 cd test
 
-for t in allowuninstall alternative blacklist choicerules choose cleandeps \
-         cplxdeps distupgrade evrcmp excludefromweak favor focus forcebest \
-         lock lockstep multiversion namespace proof recommendations sat \
-         selection strictrepoprio strongrecommends targeted testcase weakdeps \
-         whatprovideswithdisabled yumobs; do
-
-    if [ -x ./runtestcases.sh ] && [ -d testcases/$t ]; then
-        ./runtestcases.sh ../tools/testsolv testcases/$t
-        if [ $? -eq 0 ]; then
-            echo "PASS: $t"
-        else
-            echo "FAIL: $t"
-        fi
+for t in testcases/*; do
+    ./runtestcases.sh ../tools/testsolv $t
+    if [ $? -eq 0 ]; then
+        echo "PASS: $t"
     else
-        echo "SKIP: $t"
+        echo "FAIL: $t"
     fi
 done
index 53daa3610668c83043a56d370efd80f98cc82c2e..ef348de9047ed9eab411bb82352b058ac7001430 100644 (file)
@@ -38,18 +38,9 @@ do_compile_ptest() {
 do_install_ptest() {
     install -d ${D}${PTEST_PATH}/tools
     install -d ${D}${PTEST_PATH}/test
-
-    if [ -f ${B}/tools/testsolv ]; then
-        install -m 0755 ${B}/tools/testsolv ${D}${PTEST_PATH}/tools/
-    fi
-
-    if [ -f ${S}/test/runtestcases.sh ]; then
-        install -m 0755 ${S}/test/runtestcases.sh ${D}${PTEST_PATH}/test/
-    fi
-
-    if [ -d ${S}/test/testcases ]; then
-        cp -r ${S}/test/testcases ${D}${PTEST_PATH}/test/
-    fi
+    install -m 0755 ${B}/tools/testsolv ${D}${PTEST_PATH}/tools/
+    install -m 0755 ${S}/test/runtestcases.sh ${D}${PTEST_PATH}/test/
+    cp -r ${S}/test/testcases ${D}${PTEST_PATH}/test/
 }
 
 RDEPENDS:${PN}-ptest += "bash"