[OE-core] [PATCH 2/2] ptest-runner: Added the option to run a single package ptest suite.
Lucian Musat
george.l.musat at intel.com
Wed Jul 22 11:58:46 UTC 2015
If you give it a ptest enabled package as a paramter it will run
only it's suite.
Signed-off-by: Lucian Musat <george.l.musat at intel.com>
---
.../ptest-runner/files/ptest-runner | 47 +++++++++++++---------
1 file changed, 28 insertions(+), 19 deletions(-)
diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
index a21102e..9f69602 100644
--- a/meta/recipes-support/ptest-runner/files/ptest-runner
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -1,27 +1,36 @@
#!/bin/sh
-ANYFAILED=no
-echo "START: $0"
-for libdir in /usr/lib*
-do
+ARGS=("$@")
- [ ! -d "$libdir" ] && continue
+ANYFAILED=no
+echo "START: $0"
- for x in `ls -d $libdir/*/ptest 2>/dev/null`
+function run_ptest()
+{
+ for libdir in $1
do
- [ ! -f $x/run-ptest ] && continue
- [ -h `dirname $x` ] && continue
-
- date "+%Y-%m-%dT%H:%M"
- echo "BEGIN: $x"
- cd "$x"
- timeout 10m ./run-ptest || ANYFAILED=yes
- echo "END: $x"
- date "+%Y-%m-%dT%H:%M"
+ [ ! -d "$libdir" ] && continue
+ for x in `ls -d $libdir*/ptest 2>/dev/null`
+ do
+ [ ! -f $x/run-ptest ] && continue
+ [ -h `dirname $x` ] && continue
+ date "+%Y-%m-%dT%H:%M"
+ echo "BEGIN: $x"
+ cd "$x"
+ timeout 10m ./run-ptest || ANYFAILED=yes
+ echo "END: $x"
+ date "+%Y-%m-%dT%H:%M"
+ done
done
-done
-echo "STOP: $0"
-if [ "$ANYFAILED" = "yes" ]; then
- exit 1
+ echo "STOP: $0"
+ if [ "$ANYFAILED" = "yes" ]; then
+ exit 1
+ fi
+}
+
+if [ "$#" -lt 1 ]; then
+ run_ptest '/usr/lib/*'
+else
+ run_ptest /usr/lib/${ARGS}
fi
exit 0
--
2.1.4
More information about the Openembedded-core
mailing list