Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not pass -g, or we conflict with the -g3 passed by the compiler.m4. And let this...
[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 -e "^build='[^']*'\$" buildlogs/$VERSION/$file| \
40          sed "s/^build='\([^']*\)'\$/\1/"`
41     grassys=`grep "^#define GRAS_THISARCH" buildlogs/$VERSION/$file| \
42              sed 's/.*GRAS_THISARCH //'`
43
44          
45     ## Make text and html outputs
46     if [ "x$last" = "xRemote compilation sucessful." ] ; then
47       res="success: "
48       color=
49     else
50       res="FAILED:  "
51       color="#fc5e5e"
52     fi
53     echo "<tr <td><a href=$VERSION/$host.output>$res</a>" >> $HTML
54     echo "    <td bgcolor='$color'>$host"                 >> $HTML
55     echo "    <td><a href=$VERSION/$host.config>$sys</a>" >> $HTML
56     
57     echo "$res $host     $sys ($grassys)"
58   done
59   echo "</table>" >> $HTML
60 done
61 echo "</html>" >>$HTML