Annotation of hatari/tests/cycles/run_test.sh, revision 1.1

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: remove_temp() {
        !            19:   rm -rf "$testdir"
        !            20: }
        !            21: trap remove_temp EXIT
        !            22: 
        !            23: export SDL_VIDEODRIVER=dummy
        !            24: export SDL_AUDIODRIVER=dummy
        !            25: 
        !            26: cp "$basedir/cyccheck.prg" "$testdir"
        !            27: HOME="$testdir" $hatari --log-level fatal --fast-forward on --sound off \
        !            28:        --run-vbls 1000 --tos none $* "$testdir/cyccheck.prg" \
        !            29:        > "$testdir/log.txt" 2>&1
        !            30: exitstat=$?
        !            31: if [ $exitstat -ne 0 ]; then
        !            32:        echo "Test FAILED, Hatari returned error status ${exitstat}."
        !            33:        cat "$testdir/log.txt"
        !            34:        exit 1
        !            35: fi
        !            36: 
        !            37: if ! diff -q "$basedir/test_out.txt" "$testdir/RESULTS.TXT"; then
        !            38:        echo "Test FAILED, output differs:"
        !            39:        diff -u "$basedir/test_out.txt" "$testdir/RESULTS.TXT"
        !            40:        exit 1
        !            41: fi
        !            42: 
        !            43: echo "Test PASSED."
        !            44: exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.