#!/bin/sh

# Run testsuite which use dejagnu
cd ./testsuite
for tool in @DEJATOOL@; do
    runtest -a --tool $tool --outdir ../log
done
cd -

# Run test programs not used by dejagnu but run directly
for p in @TESTS@; do
    ./src/tests/"$p" > ./log/"$p".log 2>&1
    case "$?" in
        0)
            echo "PASS: $p"
            ;;
        77)
            echo "SKIP: $p"
            ;;
        *)
            echo "FAIL: $p"
            ;;
    esac
done
