lustrec / test / test-compile.sh @ 71513f0e
History | View | Annotate | Download (909 Bytes)
1 |
#!/bin/bash |
---|---|
2 |
|
3 |
NOW=`date "+%y%m%d%H%M"` |
4 |
#LUSTREC="../../_build/src/lustrec" |
5 |
LUSTREC=lustrec |
6 |
mkdir -p build |
7 |
cd build |
8 |
|
9 |
while IFS=, read -r file main opts |
10 |
do |
11 |
# echo fichier:$file |
12 |
# echo main:$main |
13 |
# echo opts:$opts |
14 |
if [ "$main" != "" ]; then |
15 |
$LUSTREC -d build -verbose 0 $opts -node $main ../$file; |
16 |
else |
17 |
$LUSTREC -d build -verbose 0 $opts ../$file |
18 |
fi |
19 |
if [ $? -ne 0 ]; then |
20 |
rlustrec="INVALID"; |
21 |
else |
22 |
rlustrec="VALID" |
23 |
fi |
24 |
gcc -c -Wall -Wno-unused-but-set-variable -I ../../include/ `basename $file .lus`.c > /dev/null |
25 |
if [ $? -ne 0 ]; then |
26 |
rgcc="INVALID"; |
27 |
else |
28 |
rgcc="VALID" |
29 |
fi |
30 |
echo "lustrec ($rlustrec),gcc ($rgcc),diff with ref ($rdiff),`dirname $file`,`basename $file`,node $main" | column -t -s',' | tee -a ../report-$NOW | grep INVALID |
31 |
# awk 'BEGIN { FS = "\" " } ; { printf "%-20s %-40s\n", $1, $2, $3}' |
32 |
done < ../tests_ok.list |