File: t_interactive

package info (click to toggle)
sdcv 0.5.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 596 kB
  • sloc: cpp: 3,082; sh: 226; xml: 23; makefile: 10
file content (20 lines) | stat: -rwxr-xr-x 345 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# check that in not-interactive mode sdcv not wait any input

PATH_TO_SDCV="$1"

if test ! -x "$PATH_TO_SDCV"; then
    echo "Can not find sdcv binary $1" >&2
    exit 1
fi

"$PATH_TO_SDCV" -n >/dev/null 2>&1 &
PID=$!
sleep 1

if kill -0 $PID >/dev/null 2>&1 ; then
	echo "process wait input: $PID, test failed" >&2
	exit 1
fi

exit 0