dbus/test/dbus-test-runner
Simon McVittie a2f3b17504 Add support for installing most of the modular tests
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:35 +01:00

43 lines
676 B
Bash
Executable file

#!/bin/sh
set -e
dir="$1"
shift
if ! test -d "$dir"; then
echo "Usage: dbus-test-runner directory [executable...]"
exit 0
fi
passed=0
failed=0
skipped=0
for prog in "$@"; do
e=0
"$dir/$prog" || e=$?
case $e in
(0)
echo "PASS: $prog"
passed=`expr $passed + 1`
;;
(77)
echo "SKIP: $prog"
skipped=`expr $skipped + 1`
;;
(*)
echo "FAIL: $prog"
failed=`expr $failed + 1`
;;
esac
done
if test $failed = 0; then
# avoid saying "FAIL", to make it easy to grep results!
echo "PASSED $passed / SKIPPED $skipped"
exit 0
else
echo "PASSED $passed / FAILED $failed / SKIPPED $skipped"
exit 1
fi