Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Html generation toy
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 13 Jul 2004 02:05:08 +0000 (02:05 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 13 Jul 2004 02:05:08 +0000 (02:05 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@267 48e7efb5-ca39-0410-a469-dd3cf9ba447f

tools/compile-stats [new file with mode: 0755]

diff --git a/tools/compile-stats b/tools/compile-stats
new file mode 100755 (executable)
index 0000000..053fdf0
--- /dev/null
@@ -0,0 +1,58 @@
+#! /bin/sh
+
+HTML="buildlogs/index.html"
+rm -f $HTML
+
+echo "<html>" >> $HTML
+for VERSION in `ls buildlogs|grep -v html` ; do
+  echo "XXXX Version $VERSION"
+  echo "<h3>$VERSION</h3><table border=1>" >> $HTML
+  for file in `ls buildlogs/$VERSION/*.log`; do
+    file=`basename $file`
+    host=`basename $file .log`
+    
+    ## Extract the output from config.log
+    cat buildlogs/$VERSION/$file | \
+      sed -e ':begin' \
+          -e '/CONFIG-LOG-DUMP-BEGIN/ { ' \
+         -e '  :in' \
+         -e '  n'\
+         -e '  /CONFIG-LOG-DUMP-END/Q' \
+         -e '  p'\
+         -e '  b in' \
+         -e '}'\
+         -e 'n'\
+         -e 'b begin' \
+         -n \
+       >buildlogs/$VERSION/$host.config
+    cat buildlogs/$VERSION/$file | \
+      sed -e ':begin' \
+          -e '/CONFIG-LOG-DUMP-BEGIN/Q'\
+         -e 'p'\
+         -e 'n'\
+         -e 'b begin' \
+         -n \
+       >buildlogs/$VERSION/$host.output
+
+    ## Extract some info out there
+    last=`tail -n 1 buildlogs/$VERSION/$file`
+    sys=`grep "checking target system type..." buildlogs/$VERSION/$file| \
+        sed 's/checking target system type...//'`
+        
+    ## Make text and html outputs
+    if [ "x$last" = "xRemote compilation sucessful." ] ; then
+      res="success: "
+      color=
+    else
+      res="FAILED:  "
+      color="#fc5e5e"
+    fi
+    echo "<tr <td><a href=$VERSION/$host.output>$res</a>" >> $HTML
+    echo "    <td bgcolor='$color'>$host"                 >> $HTML
+    echo "    <td><a href=$VERSION/$host.config>$sys</a>" >> $HTML
+    
+    echo "$res $host     $sys"
+  done
+  echo "</table>" >> $HTML
+done
+echo "</html>" >>$HTML