"
#check that at least one Test exists
if [ `wc -l $package.log | awk '{printf("%s",$1);}'` = "0" ]; then
#No Test: use a table to fix entourage bug.
echo "
"
else
echo "
"
echo " Result | Tolerance | Test | Solution | Field |
"
# go through the lines of $package.log
COUNTER=0
MAX=`wc -l $package.log | awk '{printf("%s",$1);}'`
while [ $COUNTER -lt $MAX ]; do
let COUNTER=COUNTER+1
echo ""
#see wether it is success or error (get color: red or green)
if [ "`cat $package.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk '/line'$COUNTER'o/ {printf("%s\n",$2);}';`" == "SUCCESS" ];
then
color="bgcolor=#ddffdd";
else
color="bgcolor=#ffdddd";
fi
#build html corresponding line
cat $package.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk '/line'$COUNTER'o/ {printf("%s | %s%s%s | %s | %s | %s | ",$2,$4,$5,$6,$8,$10,$14);}';
echo "
"
done
echo "
"
fi
#Print end division and remove log file
echo "
"
rm $package.log
done)
host: $HOST_NAME
platform: $ISSM_ARCH
release: $ISSM_RELEASE
status: $(if [ `wc -l check.log | awk '{printf("%s",$1);}'` = "0" ]; then echo "stopped before the end" else echo "all test desks have been run" fi rm check.log)
number of errors: $(wc -l errors.log | awk '{printf("%s",$1);}')/$(wc -l tests.log | awk '{printf("%s",$1);}'; rm errors.log)
number of success: $(wc -l success.log | awk '{printf("%s",$1);}')/$(wc -l tests.log | awk '{printf("%s",$1);}';rm success.log tests.log)