6a4f465f53
qemu-system-ppc emulator is installed.
28 lines
393 B
Bash
Executable file
28 lines
393 B
Bash
Executable file
#!/bin/sh
|
|
qemu=$1
|
|
img=$2
|
|
timeout=$3
|
|
|
|
pipe=/tmp/testdriver.$$.pipe
|
|
mknod $pipe p
|
|
trap "rm $pipe" EXIT
|
|
|
|
timeout $timeout $qemu -nographic -kernel $img >$pipe 2>&1 &
|
|
pid=$!
|
|
|
|
status=0
|
|
while read line < $pipe; do
|
|
case "$line" in
|
|
*@@FAIL*)
|
|
echo $line
|
|
status=1
|
|
;;
|
|
|
|
*@@FINISHED*)
|
|
kill $pid
|
|
;;
|
|
esac
|
|
done
|
|
|
|
exit $status
|