|
|
1.1 ! root 1: #!/bin/sh ! 2: ! 3: if [ $# -lt 1 -o "$1" = "-h" -o "$1" = "--help" ]; then ! 4: echo "Usage: $0 <hatari> ..." ! 5: exit 1; ! 6: fi ! 7: ! 8: hatari=$1 ! 9: shift ! 10: if [ ! -x "$hatari" ]; then ! 11: echo "First parameter must point to valid hatari executable." ! 12: exit 1; ! 13: fi; ! 14: ! 15: basedir=$(dirname $0) ! 16: testdir=$(mktemp -d) ! 17: ! 18: export SDL_VIDEODRIVER=dummy ! 19: export SDL_AUDIODRIVER=dummy ! 20: unset TERM ! 21: ! 22: echo c | HOME="$testdir" $hatari --log-level fatal --sound off --natfeats on \ ! 23: --tos none --fast-forward on --run-vbls 500 $* "$basedir/nf_ahcc.tos" \ ! 24: 2>&1 | sed -e 's/^Hatari v.*/Hatari v/' -e 's/^CPU=.*$/CPU=.../' \ ! 25: -e 's/^\$00.*/\$00.../' -e '/^> c$/d' -e 's/^> //' \ ! 26: > "$testdir/out.txt" ! 27: exitstat=$? ! 28: if [ $exitstat -ne 0 ]; then ! 29: echo "Running hatari failed. Status=${exitstat}." ! 30: cat "$testdir/out.txt" ! 31: rm -rf "$testdir" ! 32: exit 1 ! 33: fi ! 34: ! 35: if ! diff -q "$basedir/test_out.txt" "$testdir/out.txt"; then ! 36: echo "Test FAILED, output differs:" ! 37: diff -u "$basedir/test_out.txt" "$testdir/out.txt" ! 38: rm -rf "$testdir" ! 39: exit 1 ! 40: fi ! 41: ! 42: echo "Test PASSED." ! 43: rm -rf "$testdir" ! 44: exit 0
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.