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"
9 OUTPUTDIR="stats-`date +%d.%m.%y`"
15 XMLRES=$OUTPUTDIR/result.xml
16 cat > $XMLRES << __END__
20 <EDG_CFLAGS>${EDG_CFLAGS}</EDG_CFLAGS>
21 <GCC_CFLAGS>${GCC_CFLAGS}</GCC_CFLAGS>
25 # so endless apps stop at some point...
30 for dir in . gcc-testsuite gcc-testsuite/ieee; do
32 echo "<section name=\"$curdir/\">" >> $XMLRES
33 for file in $curdir/$CFILES; do
38 FIRM_RUN_RES="omitted"
41 name="`basename $file .c`"
42 res="$OUTPUTDIR/buildresult_$name.txt"
44 echo "Results for $name" > $res
45 echo "*** EDG/FIRM Compile" >> $res
46 CMD="ulimit -t$TIMEOUT_COMPILE ; ${EDG_BIN} ${EDG_CFLAGS} $file"
48 /bin/bash -c "ulimit -t300 ; ${EDG_BIN} ${EDG_CFLAGS} $file" >> $res 2>&1 || COMPILE_RES="failed"
50 if [ ${COMPILE_RES} == "ok" ]; then
52 CMD="mv $curdir/$name.s build_firm/$name.s"
55 echo "*** Linking" >> $res
56 CMD="gcc build_firm/$name.s ${LINKFLAGS} -o build_firm/$name.exe"
58 $CMD >> $res 2>&1 || LINK_RES="failed"
61 echo "*** GCC Compile" >> $res
62 CMD="gcc ${GCC_CFLAGS} $file ${LINKFLAGS} -o build_gcc/$name.exe"
64 $CMD >> $res 2>&1 || GCC_RES="failed"
66 if [ ${GCC_RES} = "ok" ]; then
69 echo "*** Run GCC" >> $res
70 CMD="build_gcc/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
72 /bin/bash -c "ulimit -t$TIMEOUT_RUN ; build_gcc/$name.exe" > $OUTPUTDIR/result_gcc_$name.txt 2>&1 || GCC_RUN_RES="failed"
75 if [ ${LINK_RES} = "ok" ]; then
78 echo "*** Run Firm" >> $res
79 CMD="build_firm/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
81 /bin/bash -c "ulimit -t$TIMEOUT_RUN ; build_firm/$name.exe" > $OUTPUTDIR/result_firm_$name.txt 2>&1 || FIRM_RUN_RES="failed"
84 if [ ${GCC_RUN_RES} = "ok" -a ${FIRM_RUN_RES} = "ok" ]; then
87 echo "*** Compare Results" >> $res
88 CMD="diff -u $OUTPUTDIR/result_gcc_$name.txt $OUTPUTDIR/result_firm_$name.txt"
89 $CMD > $OUTPUTDIR/result_diff_$name.txt 2>&1 || DIFF_RES="failed"
92 cat >> $XMLRES << __END__
94 <compile>$COMPILE_RES</compile>
95 <link>$LINK_RES</link>
96 <gcc_compile>$GCC_RES</gcc_compile>
97 <gcc_run>$GCC_RUN_RES</gcc_run>
98 <firm_run>$FIRM_RUN_RES</firm_run>
99 <diff>$DIFF_RES</diff>
103 echo "</section>" >> $XMLRES
106 echo "</results>" >> $XMLRES
108 xsltproc --output $OUTPUTDIR/index.html makehtml.xslt $XMLRES
110 # maybe execute custom actions after result has been generated
111 [ -e after_compile.sh ] && ./after_compile.sh "$OUTPUTDIR"