public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Pratik Farkase <pratik.farkase@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com, Pratik Farkase <pratik.farkase@est.tech>
Subject: [OE-core][PATCH v1] libsolv: ptest: remove conditional checks
Date: Wed, 11 Feb 2026 17:35:14 +0100	[thread overview]
Message-ID: <20260211163515.6656-1-pratik.farkase@est.tech> (raw)

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>
---
 .../libsolv/libsolv/run-ptest                 | 19 +++++--------------
 .../libsolv/libsolv_0.7.35.bb                 | 15 +++------------
 2 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/meta/recipes-extended/libsolv/libsolv/run-ptest b/meta/recipes-extended/libsolv/libsolv/run-ptest
index 1462aecd61..857b719ae5 100755
--- a/meta/recipes-extended/libsolv/libsolv/run-ptest
+++ b/meta/recipes-extended/libsolv/libsolv/run-ptest
@@ -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
diff --git a/meta/recipes-extended/libsolv/libsolv_0.7.35.bb b/meta/recipes-extended/libsolv/libsolv_0.7.35.bb
index 53daa36106..ef348de904 100644
--- a/meta/recipes-extended/libsolv/libsolv_0.7.35.bb
+++ b/meta/recipes-extended/libsolv/libsolv_0.7.35.bb
@@ -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"
-- 
2.43.0



                 reply	other threads:[~2026-02-11 16:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260211163515.6656-1-pratik.farkase@est.tech \
    --to=pratik.farkase@est.tech \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pratik.farkase@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox