#!/bin/sh

set -e

# cvc4 is not available on every architecture, so we gracefully exit
# when cvc4 is not installed.
if [ ! -x /usr/bin/cvc4 ]
then
    echo "skip thistest since cvc4 is not installed"
    exit 0
fi

indir=debian/tests/why
why3 config --detect-provers > /dev/null 2>&1
for infile in $indir/*.mlw
do
    why3 prove -P CVC4 $infile | grep -q "Valid"
done
