kesterel2lustre

compile Kernel Esterel to Lustre
git clone https://a3nm.net/git/kesterel2lustre/
Log | Files | Refs | README

testall.sh (770B)


      1 #!/bin/bash
      2 
      3 function failed() {
      4   #echo -ne '\E[31m'"\033[1mfailed!\033[0m "
      5   echo -n "failed "
      6 }
      7 
      8 ls test/*.strl | while read a
      9 do
     10   F=`basename $a`
     11   F=${F%.strl}
     12   printf "%-20s" "[$F] "
     13   ./rungolden.sh $F 2> /dev/null > test/$F.golden || {
     14     echo "error: ./rungolden.sh $F failed"
     15     exit 4
     16   }
     17   LEN=`wc -l test/$F.golden | cut -d ' ' -f 1`
     18   if [ $LEN -lt 2 ]
     19   then
     20     echo "error: no reference output"
     21     exit 2
     22   fi
     23   ./runtest.sh $F 2> /dev/null > test/$F.test || {
     24     echo "error: ./runtest.sh $F failed";
     25     exit 4
     26   }
     27   if diff test/$F.test test/$F.golden > test/$F.diff
     28   then
     29     #echo -e '\E[32m'"\033[1mpassed\033[0m"
     30     echo -e "passed"
     31   else
     32     failed
     33     echo "with the following diff:"
     34     cat test/$F.diff
     35     exit 1
     36   fi
     37 done
     38 exit 0
     39