2 EDG_CFLAGS="--c --gnu=30305 -I/usr/lib/gcc-lib/i586-suse-linux/3.3.5/include"
3 GCC_CFLAGS="-O3 -g -fomit-frame-pointer"
7 OUTPUTDIR="stats-`date +%d.%m.%y`"
13 XMLRES=$OUTPUTDIR/result.xml
14 cat > $XMLRES << __END__
18 <EDG_CFLAGS>${EDG_CFLAGS}</EDG_CFLAGS>
19 <GCC_CFLAGS>${GCC_CFLAGS}</GCC_CFLAGS>
23 # so endless apps stop at some point...
28 for dir in . gcc-testsuite gcc-testsuite/ieee; do
30 echo "<section name=\"$curdir/\">" >> $XMLRES
31 for file in $curdir/$CFILES; do
36 FIRM_RUN_RES="omitted"
39 name="`basename $file .c`"
40 res="$OUTPUTDIR/buildresult_$name.txt"
42 echo "Results for $name" > $res
43 echo "*** EDG/FIRM Compile" >> $res
44 CMD="ulimit -t300 ; ${EDG_BIN} ${EDG_CFLAGS} $file"
46 /bin/bash -c "ulimit -t300 ; ${EDG_BIN} ${EDG_CFLAGS} $file" >> $res 2>&1 || COMPILE_RES="failed"
48 if [ ${COMPILE_RES} == "ok" ]; then
50 CMD="mv $curdir/$name.s build_firm/$name.s"
53 echo "*** Linking" >> $res
54 CMD="gcc build_firm/$name.s ${LINKFLAGS} -o build_firm/$name.exe"
56 $CMD >> $res 2>&1 || LINK_RES="failed"
59 echo "*** GCC Compile" >> $res
60 CMD="gcc ${GCC_CFLAGS} $file ${LINKFLAGS} -o build_gcc/$name.exe"
62 $CMD >> $res 2>&1 || GCC_RES="failed"
64 if [ ${GCC_RES} = "ok" ]; then
67 echo "*** Run GCC" >> $res
68 CMD="build_gcc/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
70 /bin/bash -c "ulimit -t2 ; build_gcc/$name.exe" > $OUTPUTDIR/result_gcc_$name.txt 2>&1 || GCC_RUN_RES="failed"
73 if [ ${LINK_RES} = "ok" ]; then
76 echo "*** Run Firm" >> $res
77 CMD="build_firm/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
79 /bin/bash -c "ulimit -t2 ; build_firm/$name.exe" > $OUTPUTDIR/result_firm_$name.txt 2>&1 || FIRM_RUN_RES="failed"
82 if [ ${GCC_RUN_RES} = "ok" -a ${FIRM_RUN_RES} = "ok" ]; then
85 echo "*** Compare Results" >> $res
86 CMD="diff -u $OUTPUTDIR/result_gcc_$name.txt $OUTPUTDIR/result_firm_$name.txt"
87 $CMD > $OUTPUTDIR/result_diff_$name.txt 2>&1 || DIFF_RES="failed"
90 cat >> $XMLRES << __END__
92 <compile>$COMPILE_RES</compile>
93 <link>$LINK_RES</link>
94 <gcc_compile>$GCC_RES</gcc_compile>
95 <gcc_run>$GCC_RUN_RES</gcc_run>
96 <firm_run>$FIRM_RUN_RES</firm_run>
97 <diff>$DIFF_RES</diff>
101 echo "</section>" >> $XMLRES
104 echo "</results>" >> $XMLRES
106 xsltproc --output $OUTPUTDIR/index.html makehtml.xslt $XMLRES
108 # maybe execute custom actions after result has been generated
109 [ -e after_compile.sh ] && ./after_compile.sh "$OUTPUTDIR"