Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add portable.h (headers to include to program in a portable manner, for internal...
[simgrid.git] / tools / compile-stats
1 #! /bin/sh
2
3 HTML="buildlogs/index.html"
4 rm -f $HTML
5
6 echo "<html>" >> $HTML
7 for VERSION in `ls buildlogs|grep -v html` ; do
8   echo "XXXX Version $VERSION"
9   echo "<h3>$VERSION</h3><table border=1>" >> $HTML
10   for file in `ls buildlogs/$VERSION/*.log`; do
11     file=`basename $file`
12     host=`basename $file .log`
13     
14     ## Extract the output from config.log
15     cat buildlogs/$VERSION/$file | \
16       sed -e ':begin' \
17           -e '/CONFIG-LOG-DUMP-BEGIN/ { ' \
18           -e '  :in' \
19           -e '  n'\
20           -e '  /CONFIG-LOG-DUMP-END/Q' \
21           -e '  p'\
22           -e '  b in' \
23           -e '}'\
24           -e 'n'\
25           -e 'b begin' \
26           -n \
27        >buildlogs/$VERSION/$host.config
28     cat buildlogs/$VERSION/$file | \
29       sed -e ':begin' \
30           -e '/CONFIG-LOG-DUMP-BEGIN/Q'\
31           -e 'p'\
32           -e 'n'\
33           -e 'b begin' \
34           -n \
35        >buildlogs/$VERSION/$host.output
36
37     ## Extract some info out there
38     last=`tail -n 1 buildlogs/$VERSION/$file`
39     sys=`grep "checking target system type..." buildlogs/$VERSION/$file| \
40          sed 's/checking target system type...//'`
41          
42     ## Make text and html outputs
43     if [ "x$last" = "xRemote compilation sucessful." ] ; then
44       res="success: "
45       color=
46     else
47       res="FAILED:  "
48       color="#fc5e5e"
49     fi
50     echo "<tr <td><a href=$VERSION/$host.output>$res</a>" >> $HTML
51     echo "    <td bgcolor='$color'>$host"                 >> $HTML
52     echo "    <td><a href=$VERSION/$host.config>$sys</a>" >> $HTML
53     
54     echo "$res $host     $sys"
55   done
56   echo "</table>" >> $HTML
57 done
58 echo "</html>" >>$HTML