Skip to content

Commit

Permalink
* Group warnings in html report for the farm
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Sep 23, 2011
1 parent a832ca0 commit 1eb3586
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sys/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi

# build
if [ -f config-user.mk ]; then
make mrproper
make mrproper > /dev/null 2>&1
fi
./configure --prefix=/usr && \
make -j 4
14 changes: 12 additions & 2 deletions sys/farm/html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ for a in log/*.log ; do
echo "<h2>warnings: $warnings</h2>" >> $b
echo "<h2>errors: $errors</h2>" >> $b
echo "<h2>return: "`cat $r`"</h2>" >> $b
echo "<h2>warnings:</h2>" >> $b
echo "<pre>" >> $b
grep warning: $a | awk '{
gsub(/warning\: (.*)$/,"<b style=color:yellow>warning: &</b>");
print}' >> $b
echo "<h2>errors:</h2>" >> $b
grep error: $a | awk '{
gsub(/error\: (.*)$/,"<b style=color:red>error: &</b>");
print}' >> $b
echo "<h2>build:</h2>" >> $b
cat $a | awk '{
gsub(/warning\: (.*)$/,"<b style=color:yellow>warning: &</b>");
gsub(/error\: (.*)$/,"<b style=color:red>error: &</b>");
Expand All @@ -30,10 +39,11 @@ EOF

for a in log/*.html ; do
[ $a = log/index.html ] && continue
warnings=$(cat $a|grep warning: |wc -l)
errors=$(cat $a|grep error: |wc -l)
f=$(echo $a | sed -e 's,log/,,')
l=log/$(echo $f | sed -e 's,.html,.log,')
n=$(echo $f | sed -e 's,.html,,' | sed -e 's,-, ,g')
warnings=$(cat $l|grep warning: |wc -l)
errors=$(cat $l|grep error: |wc -l)
echo "<h2><a href=$f>$n</a></h2>" >> log/index.html
echo "<h3>&nbsp;&nbsp;&nbsp;warnings: $warnings</h3>" >> log/index.html
echo "<h3>&nbsp;&nbsp;&nbsp;errors: $errors</h3>" >> log/index.html
Expand Down

0 comments on commit 1eb3586

Please sign in to comment.