1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#!/bin/sh
set -e
: ${UTRANS:=../utrans}
for backend in openrc cron xinetd inetd lsb ; do
echo "Testing $backend backend" >&2
output=$(mktemp -d)
trap 'rm -rf ${output}' EXIT
find ./input -maxdepth 2 ! -type d -print -exec "$UTRANS" -f overwrite -b ="${backend}" '{}' "${output}" ';' 2>&1 |
# Filter expected missing backend errors.
grep -vx "ERROR: backend for [a-z]\+ unit not available\."
diff -u -r -x '.*' expected/"${backend}" "${output}"
rm -rf "${output}"
done
|