[oe-commits] Laszlo Papp : ptest-runner: return 1 instead of zero if any test fails

git at git.openembedded.org git at git.openembedded.org
Sat Aug 23 22:02:47 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: d6b1c9e7e29aaa8d71ccb485b7a88863a117a8b1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d6b1c9e7e29aaa8d71ccb485b7a88863a117a8b1

Author: Laszlo Papp <lpapp at kde.org>
Date:   Fri Aug 22 15:05:03 2014 +0100

ptest-runner: return 1 instead of zero if any test fails

It is better to know this information from the exit code rather than parsing
test specific outputs.

Signed-off-by: Laszlo Papp <lpapp at kde.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-support/ptest-runner/files/ptest-runner | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
index 3342413..c618f11 100644
--- a/meta/recipes-support/ptest-runner/files/ptest-runner
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -1,5 +1,5 @@
 #!/bin/sh
-
+ANYFAILED=no
 echo "START: $0"
 
 for libdir in /usr/lib*
@@ -15,9 +15,13 @@ do
         date "+%Y-%m-%dT%H:%M"
         echo "BEGIN: $x"
         cd "$x"
-        ./run-ptest
+        ./run-ptest || ANYFAILED=yes
         echo "END: $x"
         date "+%Y-%m-%dT%H:%M"
     done
 done
 echo "STOP: $0"
+if [ "$ANYFAILED" = "yes"  ]; then
+    exit 1
+fi
+exit 0



More information about the Openembedded-commits mailing list