mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
89994373da
commit
3651b90107
@@ -1,10 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
result=0
|
||||||
for case in `find t -type f -name '*.t'`; do
|
for case in `find t -type f -name '*.t'`; do
|
||||||
perl -I . $case >$case.output 2>&1
|
perl -I . $case >$case.output 2>&1
|
||||||
ret=$?
|
ret=$?
|
||||||
cat $case.output
|
cat $case.output
|
||||||
if [ $ret -ne 0 ]; then
|
if [ $ret -ne 0 ]; then
|
||||||
|
result=1
|
||||||
echo "FAIL: ${case%.t}"
|
echo "FAIL: ${case%.t}"
|
||||||
elif grep -i 'SKIP' $case.output; then
|
elif grep -i 'SKIP' $case.output; then
|
||||||
echo "SKIP: ${case%.t}"
|
echo "SKIP: ${case%.t}"
|
||||||
@@ -14,3 +16,5 @@ for case in `find t -type f -name '*.t'`; do
|
|||||||
|
|
||||||
rm -f $case.output
|
rm -f $case.output
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit $result
|
||||||
|
|||||||
Reference in New Issue
Block a user