1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
#!/bin/sh
#
# This is the nightly build script.
# It does almost nothing since the process itself is kept in CVS.
#
# This causes some bootstrap problems, but we deal with that by understanding
# that this first stage bootstrap can not updated automatically. This script
# should be copied somewhere that is not in the release tree (i.e. ~/bin)
# and invoked periodically.
#
if [ -f $HOME/freeswan-regress-env.sh ]
then
. $HOME/freeswan-regress-env.sh
fi
# /btmp is a place with a bunch of space.
BTMP=${BTMP:-/btmp} export BTMP
# CVSROOT is set if not already set to the repository location.
# if remote, make sure you have cvs login done already.
CVSROOT=${CVSROOT:-/freeswan/MASTER} export CVSROOT
# BRANCH can also be set to test branches.
BRANCH=${BRANCH:-HEAD} export BRANCH
# rest of not to be touched.
YEAR=`date +%Y` export YEAR
MONTH=`date +%m` export MONTH
DAY=`date +%d` export DAY
TODAY=`date +%Y_%m_%d` export TODAY
TODAYSPLIT=`date +%Y/%m/%d` export TODAYSPLIT
BUILDSPOOL=$BTMP/$USER/$BRANCH/$TODAY export BUILDSPOOL
# go to subshell so that exit can abort that shell
(
mkdir -p $BUILDSPOOL || exit 3
cd $BUILDSPOOL || (echo "Can not make spool directory"; exit 4)
exec >$BUILDSPOOL/stdout.txt
exec 2>$BUILDSPOOL/stderr.txt
# invoke file space cleanup first.
$HOME/bin/regress-cleanup.pl || (echo "Disk space cleanup failed"; exit 5)
cvs -Q -d $CVSROOT checkout -r $BRANCH $TOPMODULE
if [ $? != 0 ]
then
echo "Failed to checkout source code. "
exit 10
fi
# invoke stage 2 now.
chmod +x $BUILDSPOOL/$TOPMODULE/testing/utils/regress-stage2.sh
$BUILDSPOOL/$TOPMODULE/testing/utils/regress-stage2.sh || exit 6
# warn about changes in myself.
cmp $BUILDSPOOL/$TOPMODULE/testing/utils/regress-nightly.sh $0
if [ $? != 0 ]
then
echo WARNING $BUILDSPOOL/$TOPMODULE/testing/utils/regress-nightly.sh differs from $0.
fi
)
# $Id: regress-nightly.sh,v 1.10 2003/11/21 23:07:03 mcr Exp $
#
# $Log: regress-nightly.sh,v $
# Revision 1.10 2003/11/21 23:07:03 mcr
# updates for hulk builds of openswan.
#
# Revision 1.9 2003/02/01 20:45:58 mcr
# moved regress results directory to be per year/month
#
# Revision 1.8 2003/01/24 16:21:41 build
# moved capture of stdout/stderr to after disk space cleanup,
# so that we can get better logging
#
# Revision 1.7 2002/05/24 03:24:04 mcr
# put all of build process into subshell so that regress-nightly.sh
# can be sourced, but the script can still exit nicely.
#
# Revision 1.4 2002/02/11 22:05:28 mcr
# initial scripts to export REGRESSRESULTS to support
# saving of testing results to a static area.
#
# Revision 1.3 2002/01/12 03:34:33 mcr
# an errant BUILDTOP remained. -> BUILDSPOOL.
#
# Revision 1.2 2002/01/11 22:14:31 mcr
# change BUILDTOP -> BUILDSPOOL.
# chmod +x all the scripts, just in case.
#
# Revision 1.1 2002/01/11 04:26:48 mcr
# revision 1 of nightly regress scripts.
#
#
|