#!/bin/sh cd `dirname $PWD/$0` || exit test -f ./bins.sh && ./bins.sh # gen htmls for a in log/*.log ; do b=$(sed -e 's,.log$,.html,' $a) r=$(sed -e 's,.log$,.ret,' $a) t=$(sed -e 's,.log$,.time,' $a) c=$(sed -e 's,.log$,.cpu,' $a) echo "
" > $b echo "" >> $b cat $t >> $b echo "" >> $b fi if [ -f $c ]; then echo "
" >> $b cat $c >> $b echo "" >> $b fi echo "
" >> $b echo "warnings: $warnings
" >> $b echo "read below" >> $b echo "errors: $errors + $undefineds
" >> $b echo "read below" >> $b echo "return: "`cat $r`"
" >> $b echo "casts: $casts
" >> $b grep -e "incompatible" $a | awk '{ gsub(/incompatible (.*)$/,"incompatible &"); print}' >> $b echo "formats: $formats
" >> $b grep -e "in format" -e "format'" $a | awk '{ gsub(/format(.*)$/,"format &"); print}' >> $b echo "allocas: $allocas
" >> $b grep "alloca'" $a | awk '{ gsub(/warning\: (.*)$/,"&"); print}' >> $b echo "undefined: $undefineds
" >> $b grep -C 2 undefined $a | awk '{ gsub(/undefined (.*)$/,"&"); print}' >> $b echo "errors:
" >> $b grep -e Error -e error: $a | awk '{ gsub(/rror\: (.*)$/,"&"); print}' >> $b grep -C 2 'returned 1' $a | awk '{ gsub(/^---$/,"
"); gsub(/^(.*)$/,"&"); print}' >> $b echo "unused: $unused
" >> $b grep -e "not used" -e unused $a | awk '{ gsub(/warning\: (.*)$/,"&"); print}' >> $b echo "warnings:
" >> $b grep warning: $a | awk '{ gsub(/warning\: (.*)$/,"&"); print}' >> $b echo "build:
" >> $b awk '{ gsub(/warning\: (.*)$/,"warning: &"); gsub(/error\: (.*)$/,"&"); print}' $a >> $b echo "" >> $b done # gen index cat <log/index.html r2 build farm r2 build farm
bins
EOF (cd log/bin && for a in * ; do s=$(du -hs $a |awk '{print $1}') echo "$a ($s)
" >> ../index.html done ) echo "builds
" >> log/index.html for a in `ls -rt log/*.log | tac`; do [ $a = log/index.html ] && continue f=$(echo $a | sed -e 's,log/,,' -e s,.log,,) l=log/$f.log ft=log/$f.time n=$(sed -e 's,-, ,g' $f) t=$(awk '/real/{print $2}' $ft) warnings=$(grep -c "warning:" $l) errors=$(grep -c "error:" $l) echo "$n (w:$warnings e:$errors $t)
" >> log/index.html done cat <> log/index.html EOF