1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/bin/sh
# select the program
elf="$1"
shift
done=0
while [ $# -gt 0 -a $done -eq 0 ]; do
case "$1" in
--stdin)
if [ $# -lt 2 ]; then
echo "Error: --stdin requires a quoted string"
exit 1
fi
stdin="$2"
shift 2
;;
--args)
if [ $# -lt 2 ]; then
echo "Error: --args requires a quoted string"
exit 1
fi
args="$2"
shift 2
;;
*)
done=1
;;
esac
done
lm32-unknown-elf-run $elf
ret=$?
case "$1" in
*printf*-tests*)
case $ret in
2)
echo 'printf-tests failed in the usual way, skipping'
ret=77
;;
esac
esac
exit $ret
|