Commit 6f111054 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(logstart, logpass, logfail, logwarn): New functions.

(dotask): New argument: warnfunc.  All callers updated.  Convert
	to Xenofarm log format version 2.
(cfgwarn, makewarn, ckprgwarn): New functions that hunt for
	warnings.  Extracted from the top level.
(Top Level): Removed special-caseing for taylor.
parent 602f6df5
......@@ -68,17 +68,40 @@ log () {
date >> r/mainlog.txt
}
logstart () {
log "BEGIN $1"
}
logpass () {
log "PASS"
}
logfail () {
log "FAIL"
}
logwarn () {
log "WARN $1"
}
dotask() {
important="$1"
task="$2"
cmd="$3"
warnfunc="$3"
cmd="$4"
if test $status = good
then
log Begin $task
logstart $task
timeecho Begin $task
if sh -c "$cmd" > r/${task}log.txt 2>&1
then
touch r/$task.pass
if [ -z "$warnfunc ]
then
logpass
else
$warnfunc
fi
else
timeecho FAIL: $task
touch r/$task.fail
......@@ -86,6 +109,7 @@ dotask() {
then
status=${task}-failed
fi
logfail
fi
else
echo status $status makes it impossible to perform this step \
......@@ -93,17 +117,88 @@ dotask() {
fi
}
cfgwarn () {
egrep -i 'warning|\(w\)' r/cfglog.txt \
> r/cfgwarn.txt
warnings=`wc -l < r/cfgwarn.txt`
if test $warnings -gt 0
then
mv r/cfg.pass r/cfg.warn
logwarn $warnings
else
rm r/cfgwarn.txt
logpass
fi
fi
makewarn () {
egrep -i 'warning|\(w\)' r/makelog.txt \
|sed \
-e '/".*1506-112 .W. Duplicate type qualifier "volatile" ignored./d' \
-e '/\/usr\/include\/bits\/socket.h:.*: warning: cast increases required alignment of target type/d' \
-e '/\/usr\/include\/sys\/vnode.h:.*: warning: declaration of .free. shadows global declaration/d' \
-e '/aux-item-def-scan\.c:.*: warning: .* defined but not used/d' \
-e '/connections.c:.*: warning: duplicate .volatile./d' \
-e '/cc: 1501-245 Warning: Hard ulimit has been reduced to less than RLIM_INFINITY. There may not be enough space to complete the compilation./d' \
-e '/"format" is an unrecognized __declspec attribute/d' \
-e '/getopt.[hc]:.*: warning: function declaration isn.t a prototype/d' \
-e '/getopt.c:451: warning: .indfound. might be used uninitialized in this function/d' \
-e '/getopt.c:461: warning: comparison between signed and unsigned/d' \
-e '/getopt1.c:.*: warning: function declaration isn.t a prototype/d' \
-e '/ramkomd.c:156: warning: function declaration isn.t a prototype/d' \
-e '/sigflags.h:3[06]: warning: duplicate .volatile./d' \
-e '/regex\.c/d' \
> r/makewarn.txt
warnings=`wc -l < r/makewarn.txt`
if test $warnings -gt 0
then
mv r/make.pass r/make.warn
logwarn $warnings
else
rm r/makewarn.txt
logpass
fi
}
ckprgwarn () {
egrep -i 'warning|\(w\)|error' r/ckprglog.txt \
|grep -v 'WARNING: Couldn.t find the global config file.' \
|grep -v 'WARNING: Couldn.t find tool init file' \
> r/ckprgwarn.txt
warnings=`wc -l < r/ckprgwarn.txt`
if test $warnings -gt 0
then
mv r/ckprg.pass r/ckprg.warn
egrep -i 'error' r/ckprgwarn.txt \
> r/ckprgfail.txt
if test `wc -l < r/ckprgfail.txt` -gt 0
then
mv r/ckprg.warn r/ckprg.fail
logfail
else
rm r/ckprgfail.txt
logwarn $warnings
fi
else
rm r/ckprgwarn.txt
logpass
fi
}
pfx=`pwd`/pfx
status=good
dotask 1 "unzip" "gzip -d $BASE.tar.gz"
dotask 1 "unpack" "tar xf $BASE.tar"
dotask 1 "cfg" "cd $BASE && ./configure -C --prefix=$pfx $cfgargs"
dotask 0 "fds" "cd $BASE/src/server/testsuite && make check-testfd"
dotask 0 "id-cc" "cd $BASE && make ident-cc"
dotask 0 "id-tx" "cd $BASE/doc && make ident-makeinfo"
dotask 1 "make" "cd $BASE && make $makeargs"
echo 'FORMAT 2' > r/mainlog.txt
dotask 1 "unzip" "" "gzip -d $BASE.tar.gz"
dotask 1 "unpack" "" "tar xf $BASE.tar"
dotask 1 "cfg" "cfgwarn" "cd $BASE && ./configure -C --prefix=$pfx $cfgargs"
dotask 0 "fds" "" "cd $BASE/src/server/testsuite && make check-testfd"
dotask 0 "id_cc" "" "cd $BASE && make ident-cc"
dotask 0 "id_tx" "" "cd $BASE/doc && make ident-makeinfo"
dotask 1 "make" "makewarn" "cd $BASE && make $makeargs"
#
# "make check" requirements
......@@ -179,17 +274,17 @@ oldstatus=$status
if $checkdocok
then
dotask 1 "ckdoc" "cd $BASE/doc && make check-doc"
dotask 1 "ckdoc" "" "cd $BASE/doc && make check-doc"
fi
if $dviok
then
dotask 0 "dvi" "cd $BASE/doc && make dvi"
dotask 0 "dvi" "" "cd $BASE/doc && make dvi"
fi
if $pdfok
then
dotask 0 "pdf" "cd $BASE/doc && make pdf"
dotask 0 "pdf" "" "cd $BASE/doc && make pdf"
fi
# Restore status: check is useful even if check-doc failed.
......@@ -197,91 +292,26 @@ status=$oldstatus
if $checkprgok
then
dotask 0 "ckprg" "cd $BASE/src && make check"
if test "`uname -n`" = taylor && test -f r/ckprg.fail
then
mv r/ckprg.fail r/ckprg.warn
fi
dotask 0 "ckprg" "" "cd $BASE/src && make check"
fi
dotask 1 "install" "cd $BASE && make install"
dotask 1 "install" "" "cd $BASE && make install"
if [ -f r/install.pass ]
then
log Xenofarm OK
logstart "findfiles"
find pfx -type f -print | sort > r/installedfiles.txt
logpass
fi
# FIXME: run distcheck.
# FIXME: compare the contents of the distcheck-generated tar file
# with the one we distributed.
log Begin response assembly
timeecho Collecting results
# Check for warnings
if test -f r/cfg.pass
then
egrep -i 'warning|\(w\)' r/cfglog.txt \
> r/cfgwarn.txt
if test `wc -l < r/cfgwarn.txt` -gt 0
then
mv r/cfg.pass r/cfg.warn
fi
fi
if test -f r/make.pass
then
egrep -i 'warning|\(w\)' r/makelog.txt \
|sed \
-e '/".*1506-112 .W. Duplicate type qualifier "volatile" ignored./d' \
-e '/\/usr\/include\/bits\/socket.h:.*: warning: cast increases required alignment of target type/d' \
-e '/\/usr\/include\/sys\/vnode.h:.*: warning: declaration of .free. shadows global declaration/d' \
-e '/aux-item-def-scan\.c:.*: warning: .* defined but not used/d' \
-e '/connections.c:.*: warning: duplicate .volatile./d' \
-e '/cc: 1501-245 Warning: Hard ulimit has been reduced to less than RLIM_INFINITY. There may not be enough space to complete the compilation./d' \
-e '/"format" is an unrecognized __declspec attribute/d' \
-e '/getopt.[hc]:.*: warning: function declaration isn.t a prototype/d' \
-e '/getopt.c:451: warning: .indfound. might be used uninitialized in this function/d' \
-e '/getopt.c:461: warning: comparison between signed and unsigned/d' \
-e '/getopt1.c:.*: warning: function declaration isn.t a prototype/d' \
-e '/ramkomd.c:156: warning: function declaration isn.t a prototype/d' \
-e '/sigflags.h:3[06]: warning: duplicate .volatile./d' \
-e '/regex\.c/d' \
> r/makewarn.txt
if test `wc -l < r/makewarn.txt` -gt 0
then
mv r/make.pass r/make.warn
else
rm r/makewarn.txt
fi
fi
if test -f r/ckprg.pass
then
egrep -i 'warning|\(w\)|error' r/ckprglog.txt \
|grep -v 'WARNING: Couldn.t find the global config file.' \
|grep -v 'WARNING: Couldn.t find tool init file' \
> r/ckprgwarn.txt
if test `wc -l < r/ckprgwarn.txt` -gt 0
then
mv r/ckprg.pass r/ckprg.warn
egrep -i 'error' r/ckprgwarn.txt \
> r/ckprgfail.txt
if test `wc -l < r/ckprgfail.txt` -gt 0
then
mv r/ckprg.warn r/ckprg.fail
else
rm r/ckprgfail.txt
fi
else
rm r/ckprgwarn.txt
fi
fi
# Collect stuff.
timeecho Collecting results
cp $BASE/config.cache r/configcache.txt
cp $BASE/config.log r/configlog.txt
cp $BASE/src/libraries/libisc-new/config.log r/iscconfiglog.txt
......@@ -301,6 +331,8 @@ type makeinfo >> r/makeinfo.txt 2>&1
cp buildid.txt r/buildid.txt
echo END >> r/mainlog.txt
(cd r && tar cf - *) > xenofarm_result.tar
gzip -1 xenofarm_result.tar
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment