Commit d4617537 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

New file. This version was taken from revision 1.9 of

projects/lyskom-server/source-transform.sh in the xenofarm CVS module,
and a copyright header and some initial comments were added.
parent 5e3dfb75
#!/bin/sh
# Perform a test compilation of the LysKOM server under Xenofarm.
# Copyright (C) 2002 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
#
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING. If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
# To understand this file, you should look at the xenofarm file
# projects/lyskom-server/source-transform.sh (see <URL:http://cvs.
# lysator.liu.se/viewcvs/viewcvs.cgi/xenofarm/projects/lyskom-server/
# source-transform.sh?cvsroot=xenofarm>). It will attempt to unpack
# the distribution, configure it, compile, run tests, and collect
# information in the "r" directory.
#
# How can this file unpack the distribution when it is part of the
# distribution? Read source-transform.sh and find out.
#
# Why is this file present here, and not in the Xenofarm CVS module?
# Because whenever anything here changes, we probably want to re-run
# the tests on the Xenofarm, and committing anything to the
# lyskom-server CVS module will trigger the creation of a source
# distribution.
VERS=`echo lyskom-server*tar.gz|sed s/lyskom-server-//|sed s/.tar.gz//`
BASE=lyskom-server-$VERS
timeecho () {
echo `TZ=UTC date|awk '{print $6 "-" $2 "-" $3 " " $4}'\
|sed -e s/Jan/01/ -e s/Feb/02/ -e s/Mar/03/ -e s/Apr/04/ \
-e s/May/05/ -e s/Jun/06/ -e s/Jul/07/ -e s/Aug/08/ \
-e s/Sep/09/ -e s/Oct/10/ -e s/Nov/11/ -e s/Dec/12/ `: "$@"
}
log () {
echo "$@" >> r/mainlog.txt
date >> r/mainlog.txt
}
dotask() {
important="$1"
task="$2"
cmd="$3"
if test $status = good
then
log Begin $task
timeecho Begin $task
if sh -c "$cmd" > r/${task}log.txt 2>&1
then
touch r/$task.pass
else
timeecho FAIL: $task
touch r/$task.fail
if [ $important = 1 ]
then
status=${task}-failed
fi
fi
else
echo status $status makes it impossible to perform this step \
> r/${task}log.txt
fi
}
pfx=`pwd`/pfx
status=good
case `uname -n` in
asmodean.lysator.liu.se)
# We need the new makeinfo from /sw/local/bin,
# and want runtest from /sw/dejagnu.
PATH=/sw/local/bin:$PATH:/sw/dejagnu/bin;;
moghedien.lysator.liu.se)
# We need the new makeinfo from /sw/local/bin.
PATH=/sw/local/bin:$PATH;;
esac
dotask 1 "unzip" "gzip -d $BASE.tar.gz"
dotask 1 "unpack" "tar xf $BASE.tar"
dotask 1 "configure" "cd $BASE && ./configure -C --prefix=$pfx"
dotask 1 "make" "cd $BASE && make"
#
# "make check" requirements
#
checkdocok=true
checkprgok=true
# We need "grep -f"
(echo a;echo b;echo c) > input
(echo a;echo b) > pattern
if grep -v -f pattern input > output && test "`cat output`" = c
then
:
else
echo grep lacks -f support >> r/checkdoclog.txt
checkdocok=false
fi
# We need "tac".
if tac < /dev/null
then
:
else
echo tac not found >> r/checkdoclog.txt
checkdocok=false
fi
# We need "python".
if python -c ""
then
:
else
echo python not found >> r/checkdoclog.txt
echo python not found >> r/checkprglog.txt
checkdocok=false
checkprgok=false
fi
# We need "runtest".
if runtest --version
then
:
else
echo runtest not found >> r/checkprglog.txt
checkprgok=false
fi
if $checkdocok
then
dotask 0 "checkdoc" "cd $BASE/doc && make check"
fi
if $checkprgok
then
dotask 0 "checkprg" "cd $BASE/src && make check"
fi
dotask 1 "install" "cd $BASE && make install"
if [ -f r/install.pass ]
then
log Xenofarm OK
find pfx -type f -print | sort > r/installedfiles.txt
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
cp $BASE/config.cache r/configcache.txt
for file in $BASE/src/server/testsuite/*.log
do
if test -f $file
then
cp $file r/`basename $file`.txt
fi
done
# find $BASE -name core -print
env > r/environ.txt
echo $PATH > r/path.txt
makeinfo --version > r/makeinfo.txt
type makeinfo >> r/makeinfo.txt 2>&1
uname -s -r -m > r/machineid.txt
uname -n >> r/machineid.txt
cp buildid.txt r/buildid.txt
# FIXME: the next two lines are only here because of the current
# confusion regarding the name of the build id file. Once we have
# settled on a name, and all clients are updated, it can be removed.
cp export.stamp r/export.stamp
cp exportstamp.txt r/exportstamp.txt
exit 0
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