Skip to content

Instantly share code, notes, and snippets.

@bountin
Created November 18, 2013 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bountin/7526196 to your computer and use it in GitHub Desktop.
Save bountin/7526196 to your computer and use it in GitHub Desktop.
A test runner script for the assignment of the lecture "Introduction to knowledge based systems" in the winter term 2013
#!/bin/bash
BIN='./dlv.i386-apple-darwin-iodbc'
OPTS='-N=75 component_tester.dl -filter=UNCOMPUTED_c,UNCOMPUTED_p,UNEXPECTED_c,UNEXPECTED_p,DUPLICATED_c,DUPLICATED_p'
for CLASS in g b s;
do
echo "----- Test class $CLASS ----"
for TEST in $CLASS.test* ;
do
RES=`eval "$BIN $OPTS $CLASS.dl $TEST" | sed -e 's/DLV \[build .*//'`
COUNT=`eval echo '$RES' | wc -c`
echo -n $TEST "..... "
if [ $COUNT -eq 3 ]; then
echo "OK"
else
echo "FAILED"
echo $RES
fi
done
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment