aboutsummaryrefslogtreecommitdiff
path: root/tests/test.sh
blob: 68e5b235e7cd51f5f49052596da50e23315ff328 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
function test {
  diff <(timeout 20s ./$1 $2 || "false") <(echo $3)
}

for file in `ls -1 $1` ; do
  if [ -e "$1/$file/testgen.sh" ] ; then
    "$1/$file/testgen.sh" | while read line ; do
      echo "./tmachines $1/$file/$file" $line
      test "./tmachines $1/$file/$file" $line
    done
  fi
done