summaryrefslogtreecommitdiffstats
path: root/ptest-runner.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ptest-runner.sh')
-rw-r--r--ptest-runner.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/ptest-runner.sh b/ptest-runner.sh
new file mode 100644
index 00000000000..aa38313df1f
--- /dev/null
+++ b/ptest-runner.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+ARGS="$@"
+
+ANYFAILED=no
+echo "START: $0"
+
+run_ptest(){
+
+ for libdir in $1
+ do
+ [ ! -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 20m ./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
+}
+
+if [ "$#" -lt 1 ]; then
+ run_ptest '/usr/lib/*'
+else
+ run_ptest /usr/lib/${ARGS}
+fi
+exit 0