OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / testing / utils / regress-nightly.sh
1 #!/bin/sh
2
3 #
4 # This is the nightly build script.
5 # It does almost nothing since the process itself is kept in CVS.
6 #
7 # This causes some bootstrap problems, but we deal with that by understanding
8 # that this first stage bootstrap can not updated automatically. This script
9 # should be copied somewhere that is not in the release tree (i.e. ~/bin) 
10 # and invoked periodically. 
11 #
12
13 if [ -f $HOME/freeswan-regress-env.sh ]
14 then
15     . $HOME/freeswan-regress-env.sh
16 fi
17
18 # /btmp is a place with a bunch of space. 
19 BTMP=${BTMP:-/btmp} export BTMP
20
21 # CVSROOT is set if not already set to the repository location.
22 # if remote, make sure you have cvs login done already.
23 CVSROOT=${CVSROOT:-/freeswan/MASTER} export CVSROOT
24
25 # BRANCH can also be set to test branches.
26 BRANCH=${BRANCH:-HEAD} export BRANCH
27
28 # rest of not to be touched.
29 TODAY=`date +%Y_%m_%d` export TODAY
30
31 BUILDSPOOL=$BTMP/$USER/$BRANCH/$TODAY export BUILDSPOOL
32 mkdir -p $BUILDSPOOL || exit 3
33
34 cd $BUILDSPOOL || exit 4
35
36 exec >$BUILDSPOOL/stdout.txt
37 exec 2>$BUILDSPOOL/stderr.txt
38
39 cvs -Q -d $CVSROOT checkout -r $BRANCH freeswan
40
41 if [ $? != 0 ]
42 then
43         echo "Failed to checkout source code. "
44         exit 10
45 fi
46
47 # invoke file space cleanup first.
48 chmod +x $BUILDSPOOL/freeswan/testing/utils/regress-cleanup.pl 
49 $BUILDSPOOL/freeswan/testing/utils/regress-cleanup.pl || exit 5
50
51 # invoke stage 2 now.
52 chmod +x $BUILDSPOOL/freeswan/testing/utils/regress-stage2.sh  
53 $BUILDSPOOL/freeswan/testing/utils/regress-stage2.sh  || exit 6
54
55 # warn about changes in myself.
56 cmp $BUILDSPOOL/freeswan/testing/utils/regress-nightly.sh $0
57         
58 if [ $? != 0 ]
59 then
60     echo WARNING $BUILDSPOOL/freeswan/testing/utils/regress-nightly.sh differs from $0.
61 fi
62
63 # $Id: regress-nightly.sh,v 1.5 2002/02/12 04:09:46 mcr Exp $
64 #
65 # $Log: regress-nightly.sh,v $
66 # Revision 1.5  2002/02/12 04:09:46  mcr
67 #       redirect and save stdout and stderr.
68 #
69 # Revision 1.4  2002/02/11 22:05:28  mcr
70 #       initial scripts to export REGRESSRESULTS to support
71 #       saving of testing results to a static area.
72 #
73 # Revision 1.3  2002/01/12 03:34:33  mcr
74 #       an errant BUILDTOP remained. -> BUILDSPOOL.
75 #
76 # Revision 1.2  2002/01/11 22:14:31  mcr
77 #       change BUILDTOP -> BUILDSPOOL.
78 #       chmod +x all the scripts, just in case.
79 #
80 # Revision 1.1  2002/01/11 04:26:48  mcr
81 #       revision 1 of nightly regress scripts.
82 #
83 #
84