Skip to contentSkip to conversation

acl/attr: ptest fixes and improvements

PATCH New Bhabu Bindu 1 participant 1 message Aug 18, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acl/attr: ptest fixes and improvements

From: Richard Purdie <[email protected]>

Add a missing perl module dependency for the ptest packages and also improve the run-ptest script so that the error log is saved allowing easier debugging if this fails in future.

(From OE-Core rev: fbb9c596b8e6a8a1260dd7aefddf138d20bf64df)

(cherry picked from commit 2c948fa0250b765bc5f2fbe63c82258601cc77ff)
---
 meta/recipes-support/attr/acl/run-ptest  | 6 ++++++
 meta/recipes-support/attr/acl_2.3.1.bb   | 1 +
 meta/recipes-support/attr/attr.inc       | 1 +
 meta/recipes-support/attr/attr/run-ptest | 7 +++++++
 4 files changed, 15 insertions(+)
meta/recipes-support/attr/acl/run-ptest +6 -0
index 4312823365..3af75c84fe 100644
@@ -7,4 +7,10 @@
 mkdir -p /tmp/acl-ptest/test
 cp test/test.* /tmp/acl-ptest/test
 
+set +e
 make test-suite.log
+exitcode=$?
+if [ $exitcode -ne 0 -a -e test-suite.log ]; then
+    cat test-suite.log
+fi
+exit $exitcode
meta/recipes-support/attr/acl_2.3.1.bb +1 -0
index aca04a9aac..c2c9ba9069 100644
@@ -62,6 +62,7 @@ RDEPENDS:${PN}-ptest = "acl \
                         bash \
                         coreutils \
                         perl \
+                        perl-module-constant \
                         perl-module-filehandle \
                         perl-module-getopt-std \
                         perl-module-posix \
meta/recipes-support/attr/attr.inc +1 -0
index a4e38f2b19..56028edb12 100644
@@ -50,6 +50,7 @@ do_install_ptest() {
 
 RDEPENDS:${PN}-ptest = "attr \
                         coreutils \
+                        perl-module-constant \
                         perl-module-filehandle \
                         perl-module-getopt-std \
                         perl-module-posix \
meta/recipes-support/attr/attr/run-ptest +7 -0
index f64244f239..3e7a3a17a0 100644
@@ -1,3 +1,10 @@
 #!/bin/sh
 
+set +e
 make test-suite.log
+exitcode=$?
+if [ $exitcode -ne 0 -a -e test-suite.log ]; then
+    cat test-suite.log
+fi
+exit $exitcode
+
Signature · 1 line
2.25.1