Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / test / test-compile.sh @ 5c1184ad

History | View | Annotate | Download (892 Bytes)

1
#!/bin/bash
2

    
3
NOW=`date "+%y%m%d%H%M"`
4
LUSTREC="../../_build/src/lustrec"
5
mkdir -p build
6
cd build
7

    
8
while IFS=, read -r file main opts
9
do
10
#   echo fichier:$file
11
#   echo main:$main
12
#   echo opts:$opts
13
    if [ "$main" != "" ]; then
14
	$LUSTREC -d build -verbose 0 $opts -node $main ../$file;
15
    else
16
	$LUSTREC -d build -verbose 0 $opts ../$file
17
    fi
18
    if [ $? -ne 0 ]; then 
19
      rlustrec="INVALID"; 
20
    else 
21
      rlustrec="VALID" 
22
    fi
23
    gcc -c -Wall -Wno-unused-but-set-variable -I ../../include/ `basename $file .lus`.c > /dev/null
24
    if [ $? -ne 0 ]; then
25
      rgcc="INVALID";
26
    else
27
      rgcc="VALID"
28
    fi    
29
    echo "lustrec ($rlustrec),gcc ($rgcc),diff with ref ($rdiff),`dirname $file`,`basename $file`,node $main" | column -t -s',' | tee -a ../report-$NOW | grep INVALID
30
# awk 'BEGIN { FS = "\" " } ; { printf "%-20s %-40s\n", $1, $2, $3}' 
31
done < ../tests_ok.list