File: t_interactive

package info (click to toggle)
sdcv 0.5.0~beta2-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 428 kB
  • ctags: 320
  • sloc: cpp: 2,883; sh: 75; makefile: 11
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