Create a log file as well as stdout during test
This commit is contained in:
parent
209f231168
commit
23b692f139
|
@ -1,13 +1,14 @@
|
||||||
ARCH=`make -f scripts/test/Makefile ARCH`
|
ARCH=`make -f scripts/test/Makefile ARCH`
|
||||||
|
DATE=`date +%Y%m%d`
|
||||||
|
LOGFILE=build-results-${DATE}-${ARCH}.log
|
||||||
function mk()
|
function mk()
|
||||||
{
|
{
|
||||||
scripts/mkpkg $1 $2 "$3"
|
scripts/mkpkg $1 $2 "$3" | tee -a ${LOGFILE}
|
||||||
}
|
}
|
||||||
|
|
||||||
function header()
|
function header()
|
||||||
{
|
{
|
||||||
echo "#!/bin/sh"
|
echo "#!/bin/sh" | tee -a ${LOGFILE}
|
||||||
echo "source \"scripts/testheader.inc\""
|
echo "source \"scripts/testheader.inc\""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,51 +18,51 @@ busybox=0
|
||||||
|
|
||||||
function SKIP()
|
function SKIP()
|
||||||
{
|
{
|
||||||
echo SKIP
|
echo SKIP | tee -a ${LOGFILE}
|
||||||
active=0
|
active=0
|
||||||
}
|
}
|
||||||
|
|
||||||
function RESTART()
|
function RESTART()
|
||||||
{
|
{
|
||||||
echo RESTART
|
echo RESTART | tee -a ${LOGFILE}
|
||||||
active=1
|
active=1
|
||||||
}
|
}
|
||||||
|
|
||||||
function EXE()
|
function EXE()
|
||||||
{
|
{
|
||||||
printf "EXE "
|
printf "EXE " | tee -a ${LOGFILE}
|
||||||
if [ ${active} == 1 ] ; then
|
if [ ${active} == 1 ] ; then
|
||||||
$1 $2 $3 "$4"
|
$1 $2 $3 "$4"
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
printf "%-8s" "$1"
|
printf "%-8s" "$1" | tee -a ${LOGFILE}
|
||||||
printf "%-32s" "$2"
|
printf "%-32s" "$2" | tee -a ${LOGFILE}
|
||||||
printf "%-16s" "$3"
|
printf "%-16s" "$3" | tee -a ${LOGFILE}
|
||||||
if [ "${4}X" != "X" ] ; then
|
if [ "${4}X" != "X" ] ; then
|
||||||
printf "%-64s" "\"$4\""
|
printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
|
||||||
fi
|
fi
|
||||||
echo
|
echo | tee -a ${LOGFILE}
|
||||||
return 1;
|
return 1;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function AVR()
|
function AVR()
|
||||||
{
|
{
|
||||||
printf "AVR "
|
printf "AVR " | tee -a ${LOGFILE}
|
||||||
if [ "${ARCH}X" == "avr32X" ] ; then
|
if [ "${ARCH}X" == "avr32X" ] ; then
|
||||||
echo "mk $2 UNSUPPORTED \"$4\" $5 $6"
|
echo "mk $2 UNSUPPORTED \"$4\" $5 $6" | tee -a ${LOGFILE}
|
||||||
return 1;
|
return 1;
|
||||||
elif [ ${active} == 1 ] ; then
|
elif [ ${active} == 1 ] ; then
|
||||||
$1 $2 "$3" "$4"
|
$1 $2 "$3" "$4"
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
printf "%-8s" "$1"
|
printf "%-8s" "$1" | tee -a ${LOGFILE}
|
||||||
printf "%-32s" "$2"
|
printf "%-32s" "$2" | tee -a ${LOGFILE}
|
||||||
printf "%-16s" "$3"
|
printf "%-16s" "$3" | tee -a ${LOGFILE}
|
||||||
if [ "${4}X" != "X" ] ; then
|
if [ "${4}X" != "X" ] ; then
|
||||||
printf "%-64s" "\"$4\"";
|
printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
|
||||||
fi
|
fi
|
||||||
echo
|
echo | tee -a ${LOGFILE}
|
||||||
return 1;
|
return 1;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -69,53 +70,53 @@ function AVR()
|
||||||
|
|
||||||
function skip()
|
function skip()
|
||||||
{
|
{
|
||||||
printf "skip %-8s" "$1"
|
printf "skip %-8s" "$1" | tee -a ${LOGFILE}
|
||||||
printf "%-32s" "$2"
|
printf "%-32s" "$2" | tee -a ${LOGFILE}
|
||||||
if [ "$3X" == "OKX" ] ; then
|
if [ "$3X" == "OKX" ] ; then
|
||||||
printf "%-16s" "DISABLED"
|
printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
|
||||||
if [ "${4}X" != "X" ] ; then
|
if [ "${4}X" != "X" ] ; then
|
||||||
printf "%-64s" "\"$4\""
|
printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
|
||||||
fi
|
fi
|
||||||
elif [ "$3X" == "FAILX" ] ; then
|
elif [ "$3X" == "FAILX" ] ; then
|
||||||
printf "%-16s" "DISABLED"
|
printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
|
||||||
if [ "${4}X" != "X" ] ; then
|
if [ "${4}X" != "X" ] ; then
|
||||||
printf "%-64s" "\"$4\""
|
printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
|
||||||
fi
|
fi
|
||||||
elif [ "$3X" == "BROKENX" ] ; then
|
elif [ "$3X" == "BROKENX" ] ; then
|
||||||
printf "%-16s" "DISABLED"
|
printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
|
||||||
if [ "${4}X" != "X" ] ; then
|
if [ "${4}X" != "X" ] ; then
|
||||||
printf "%-64s" "\"$4\""
|
printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
|
||||||
fi
|
fi
|
||||||
elif [ "$3X" == "DISABLEDX" ] ; then
|
elif [ "$3X" == "DISABLEDX" ] ; then
|
||||||
printf "%-16s" "DISABLED"
|
printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
|
||||||
if [ "${4}X" != "X" ] ; then
|
if [ "${4}X" != "X" ] ; then
|
||||||
printf "%-64s" "\"$4\""
|
printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
printf "%-16s" "DISABLED"
|
printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
|
||||||
if [ "${4}X" != "X" ] ; then
|
if [ "${4}X" != "X" ] ; then
|
||||||
printf "%-64s" "\"$4\""
|
printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo
|
echo | tee -a ${LOGFILE}
|
||||||
}
|
}
|
||||||
|
|
||||||
function bb()
|
function bb()
|
||||||
{
|
{
|
||||||
printf "%-8s" "bb"
|
printf "%-8s" "bb" | tee -a ${LOGFILE}
|
||||||
if [ ${busybox} == 1 ] ; then
|
if [ ${busybox} == 1 ] ; then
|
||||||
printf "%-8s" "$1"
|
printf "%-8s" "$1" | tee -a ${LOGFILE}
|
||||||
$1 $2 $3 $4 $5 $6
|
$1 $2 $3 $4 $5 $6
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
echo "$1 $2 $3 $4 $5 $6"
|
echo "$1 $2 $3 $4 $5 $6" | tee -a ${LOGFILE}
|
||||||
return 1;
|
return 1;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function comment()
|
function comment()
|
||||||
{
|
{
|
||||||
echo "comment $1"
|
echo "comment $1" | tee -a ${LOGFILE}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Enable HASERL
|
# Enable HASERL
|
||||||
|
|
Loading…
Reference in New Issue
Block a user