summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2009-02-02 07:18:19 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2009-02-02 07:18:19 +0000
commit23b692f1394aecbb6877292a690da8e501cf17b7 (patch)
tree9c33cccc4bb83f3ef95e81ad45c32d04b886b510 /scripts
parent209f2311685aefbedeb30d4773ca6025dc5e5350 (diff)
Create a log file as well as stdout during test
Diffstat (limited to 'scripts')
-rw-r--r--scripts/testheader.inc71
1 files changed, 36 insertions, 35 deletions
diff --git a/scripts/testheader.inc b/scripts/testheader.inc
index ea410a9ad..232e1e0a1 100644
--- a/scripts/testheader.inc
+++ b/scripts/testheader.inc
@@ -1,13 +1,14 @@
ARCH=`make -f scripts/test/Makefile ARCH`
-
+DATE=`date +%Y%m%d`
+LOGFILE=build-results-${DATE}-${ARCH}.log
function mk()
{
- scripts/mkpkg $1 $2 "$3"
+ scripts/mkpkg $1 $2 "$3" | tee -a ${LOGFILE}
}
function header()
{
- echo "#!/bin/sh"
+ echo "#!/bin/sh" | tee -a ${LOGFILE}
echo "source \"scripts/testheader.inc\""
}
@@ -17,51 +18,51 @@ busybox=0
function SKIP()
{
- echo SKIP
+ echo SKIP | tee -a ${LOGFILE}
active=0
}
function RESTART()
{
- echo RESTART
+ echo RESTART | tee -a ${LOGFILE}
active=1
}
function EXE()
{
- printf "EXE "
+ printf "EXE " | tee -a ${LOGFILE}
if [ ${active} == 1 ] ; then
$1 $2 $3 "$4"
return 0;
else
- printf "%-8s" "$1"
- printf "%-32s" "$2"
- printf "%-16s" "$3"
+ printf "%-8s" "$1" | tee -a ${LOGFILE}
+ printf "%-32s" "$2" | tee -a ${LOGFILE}
+ printf "%-16s" "$3" | tee -a ${LOGFILE}
if [ "${4}X" != "X" ] ; then
- printf "%-64s" "\"$4\""
+ printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
fi
- echo
+ echo | tee -a ${LOGFILE}
return 1;
fi
}
function AVR()
{
- printf "AVR "
+ printf "AVR " | tee -a ${LOGFILE}
if [ "${ARCH}X" == "avr32X" ] ; then
- echo "mk $2 UNSUPPORTED \"$4\" $5 $6"
+ echo "mk $2 UNSUPPORTED \"$4\" $5 $6" | tee -a ${LOGFILE}
return 1;
elif [ ${active} == 1 ] ; then
$1 $2 "$3" "$4"
return 0;
else
- printf "%-8s" "$1"
- printf "%-32s" "$2"
- printf "%-16s" "$3"
+ printf "%-8s" "$1" | tee -a ${LOGFILE}
+ printf "%-32s" "$2" | tee -a ${LOGFILE}
+ printf "%-16s" "$3" | tee -a ${LOGFILE}
if [ "${4}X" != "X" ] ; then
- printf "%-64s" "\"$4\"";
+ printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
fi
- echo
+ echo | tee -a ${LOGFILE}
return 1;
fi
}
@@ -69,53 +70,53 @@ function AVR()
function skip()
{
- printf "skip %-8s" "$1"
- printf "%-32s" "$2"
+ printf "skip %-8s" "$1" | tee -a ${LOGFILE}
+ printf "%-32s" "$2" | tee -a ${LOGFILE}
if [ "$3X" == "OKX" ] ; then
- printf "%-16s" "DISABLED"
+ printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
if [ "${4}X" != "X" ] ; then
- printf "%-64s" "\"$4\""
+ printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
fi
elif [ "$3X" == "FAILX" ] ; then
- printf "%-16s" "DISABLED"
+ printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
if [ "${4}X" != "X" ] ; then
- printf "%-64s" "\"$4\""
+ printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
fi
elif [ "$3X" == "BROKENX" ] ; then
- printf "%-16s" "DISABLED"
+ printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
if [ "${4}X" != "X" ] ; then
- printf "%-64s" "\"$4\""
+ printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
fi
elif [ "$3X" == "DISABLEDX" ] ; then
- printf "%-16s" "DISABLED"
+ printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
if [ "${4}X" != "X" ] ; then
- printf "%-64s" "\"$4\""
+ printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
fi
else
- printf "%-16s" "DISABLED"
+ printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
if [ "${4}X" != "X" ] ; then
- printf "%-64s" "\"$4\""
+ printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
fi
fi
- echo
+ echo | tee -a ${LOGFILE}
}
function bb()
{
- printf "%-8s" "bb"
+ printf "%-8s" "bb" | tee -a ${LOGFILE}
if [ ${busybox} == 1 ] ; then
- printf "%-8s" "$1"
+ printf "%-8s" "$1" | tee -a ${LOGFILE}
$1 $2 $3 $4 $5 $6
return 0;
else
- echo "$1 $2 $3 $4 $5 $6"
+ echo "$1 $2 $3 $4 $5 $6" | tee -a ${LOGFILE}
return 1;
fi
}
function comment()
{
- echo "comment $1"
+ echo "comment $1" | tee -a ${LOGFILE}
}
# Enable HASERL