OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [check-results.sh] - Diff between revs 553 and 565

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 553 Rev 565
Line 22... Line 22...
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
 
 
# Look for the different GNU results in different directories. We put the
# Look for the different GNU results in different directories. We put the
# results to a temporary file, to allow us to suck out the summary as well.
# results to a temporary file, to allow us to suck out the summary as well.
 
 
# The argument is the list of log files to process.
# The argument is the list of log files to process. It may optionally start
 
# with -d, indicating that the name of the test is the last directory name,
 
# not the tool and/or -a to indicate that tests with zero results should be
 
# included.
 
 
tmpf=/tmp/check-results-$$
tmpf=/tmp/check-results-$$
 
 
 
# Check for flags
 
usedir="false"
 
showall="false"
 
until
 
complete="false"
 
case $1
 
    in
 
    -d)
 
        usedir="true"
 
        shift
 
        ;;
 
 
 
    -a)
 
        showall="true"
 
        shift
 
        ;;
 
 
 
    *)
 
        complete="true"
 
        ;;
 
esac;
 
[ "true" == "${complete}" ]
 
do
 
    continue
 
done
 
 
# Get the individual results if we have any. Note that we don't check for the
# Get the individual results if we have any. Note that we don't check for the
# strings at start of line, since they may have FTP prompts showing. Don't
# strings at start of line, since they may have FTP prompts showing. Don't
# print out lines which have no tests at all.
# print out lines which have no tests at all.
echo "                           PASS  FAIL XPASS XFAIL UNRES UNSUP UNTES TOTAL"
echo "                           PASS  FAIL XPASS XFAIL UNRES UNSUP UNTES TOTAL"
 
 
if ls $* > /dev/null 2>&1
if ls $* > /dev/null 2>&1
then
then
    for logfile in $*
    for logfile in $*
    do
    do
 
        if [ "${usedir}" == "true" ]
 
        then
 
            dir=`dirname ${logfile}`
 
            tname=`basename ${dir}`
 
        else
        logfile_base=`basename ${logfile}`
        logfile_base=`basename ${logfile}`
        tname=`echo ${logfile_base} | sed -e 's/\.log//'`
        tname=`echo ${logfile_base} | sed -e 's/\.log//'`
 
        fi
 
 
        p=`grep 'PASS:' ${logfile} | grep -v 'XPASS' | wc -l`
        p=`grep 'PASS:' ${logfile} | grep -v 'XPASS' | wc -l`
        f=`grep 'FAIL:' ${logfile} | grep -v 'XFAIL' | wc -l`
        f=`grep 'FAIL:' ${logfile} | grep -v 'XFAIL' | wc -l`
        xp=`grep 'XPASS:' ${logfile} | wc -l`
        xp=`grep 'XPASS:' ${logfile} | wc -l`
        xf=`grep 'XFAIL:' ${logfile} | wc -l`
        xf=`grep 'XFAIL:' ${logfile} | wc -l`
        ur=`grep 'UNRESOLVED:' ${logfile} | wc -l`
        ur=`grep 'UNRESOLVED:' ${logfile} | wc -l`
        us=`grep 'UNSUPPORTED:' ${logfile} | wc -l`
        us=`grep 'UNSUPPORTED:' ${logfile} | wc -l`
        ut=`grep 'UNTESTED:' ${logfile} | wc -l`
        ut=`grep 'UNTESTED:' ${logfile} | wc -l`
        tot=`echo "${p} ${f} + ${xp} + ${xf} + ${ur} + ${us} + ${ut} + p" | dc`
        tot=`echo "${p} ${f} + ${xp} + ${xf} + ${ur} + ${us} + ${ut} + p" | dc`
 
 
        if [ "x${tot}" != "x0" ]
        if [ "${showall}" == "true" -o "x${tot}" != "x0" ]
        then
        then
            printf "%-25s %5d %5d %5d %5d %5d %5d %5d %5d\n" \
            printf "%-25s %5d %5d %5d %5d %5d %5d %5d %5d\n" \
                ${tname} ${p} ${f} ${xp} ${xf} ${ur} ${us} ${ut} ${tot} | \
                ${tname} ${p} ${f} ${xp} ${xf} ${ur} ${us} ${ut} ${tot} | \
                tee -a ${tmpf}
                tee -a ${tmpf}
        fi
        fi

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.