#!/bin/bash ulimit -v 1000000 # limit memory usage to 10 GB TESTS=`ls dist/build | grep hoed-tests-Pure` FAIL=0 echo "Testing Hoed-pure" echo # Ensure there is a directory to execute in. if [ ! -d tests/exe ]; then mkdir tests/exe fi rm -f tests/exe/* cd tests/exe for t in $TESTS; do eval ../../dist/build/$t/$t &> $t.out mv .Hoed/Events ${t}.Events diff $t.graph ../ref/$t.graph &> $t.diff if [ $? -eq 0 ]; then echo "[OK] $t" else FAIL=1 echo -n "[" echo -en '\E[37;31m'"\033[1m!!\033[0m" # red "!!" on white background tput sgr0 # reset colour echo "] $t" diff -y $t.graph ../ref/$t.graph # a side-by-side comparison fi done exit $FAIL