Forschungssoftware will stop it's service on 25.05.2018 due to the new EU regulations. Please make sure you backup your projects!

Commit 32fd1ce8 by Christian Bürckert

Nicer tests look

parent fc682384
......@@ -21,15 +21,16 @@ cd $tecs/examples
echo "Kill tecs-server"
kill $(ps aux | grep 'tecs-server' | awk '{print $2}')
export SHOULD=0
function musthave {
grep -Fq "$1" /tmp/tecs.log && echo "SUCCESS $1" || { echo "FAIL $1" && exit 1 ; }
grep -Fq "$1" /tmp/tecs.log && echo "MUSTHAVE '$1' OK" || { echo "MUSTHAVE '$1' FAIL" && exit 1 ; }
}
function mustnothave {
grep -Fq "$1" /tmp/tecs.log && { echo "FAIL! $1"; exit 1; } || { echo "SUCCESS! $1"; }
grep -Fq "$1" /tmp/tecs.log && { echo "MUSTNOTHAVE '$1' FAIL"; exit 1; } || { echo "MUSTNOTHAVE '$1' OK"; }
}
function shouldhave {
grep -Fq "$1" /tmp/tecs.log && echo "OPTIONAL $1" || echo "OPTIONAL FAILED $1"
grep -Fq "$1" /tmp/tecs.log && echo "SHOULDHAVE '$1' OK" || { echo "SHOULDHAVE '$1' FAIL"; export SHOULD=`expr $SHOULD + 1`; }
}
echo "Testing logfile /tmp/tecs.log against"
......@@ -59,5 +60,6 @@ musthave "Language: JAVA"
musthave "Language: RUBY"
musthave "Language: CPP"
musthave "Language: CSHARP"
echo "All integration tests passed"
echo ""
echo "All integration tests passed."
echo " $SHOULD optional tests failed."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment