summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-10-25 16:52:11 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-27 17:20:42 +0000
commit3651b90107235536cb29569e36dc2dc0980454af (patch)
tree9bd50cadd132fa5ec6d4ae66516c98c583306ea6
parent89994373da102547291498d8262c068152aef906 (diff)
downloadpoky-3651b90107235536cb29569e36dc2dc0980454af.tar.gz
ptest-perl/run-ptest: set exit code
Set exit code on the run-ptest script: though the logparser looks for PASS/FAIL state, it can be still useful when running the tests manually - when there is a lot of output, it is easier to see the summary at the end if the test has actually passed or failed without scrolling back. (From OE-Core rev: 645aeb43ef7b90c3ece351deb0df3a56713f1abb) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/files/ptest-perl/run-ptest4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/files/ptest-perl/run-ptest b/meta/files/ptest-perl/run-ptest
index fd35357b42..51e467abe7 100644
--- a/meta/files/ptest-perl/run-ptest
+++ b/meta/files/ptest-perl/run-ptest
@@ -1,10 +1,12 @@
1#!/bin/sh 1#!/bin/sh
2 2
3result=0
3for case in `find t -type f -name '*.t'`; do 4for case in `find t -type f -name '*.t'`; do
4 perl -I . $case >$case.output 2>&1 5 perl -I . $case >$case.output 2>&1
5 ret=$? 6 ret=$?
6 cat $case.output 7 cat $case.output
7 if [ $ret -ne 0 ]; then 8 if [ $ret -ne 0 ]; then
9 result=1
8 echo "FAIL: ${case%.t}" 10 echo "FAIL: ${case%.t}"
9 elif grep -i 'SKIP' $case.output; then 11 elif grep -i 'SKIP' $case.output; then
10 echo "SKIP: ${case%.t}" 12 echo "SKIP: ${case%.t}"
@@ -14,3 +16,5 @@ for case in `find t -type f -name '*.t'`; do
14 16
15 rm -f $case.output 17 rm -f $case.output
16done 18done
19
20exit $result