File: run

package info (click to toggle)
unit-translator 0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 632 kB
  • sloc: sh: 909; makefile: 28
file content (22 lines) | stat: -rwxr-xr-x 504 bytes parent folder | download
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