OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / testing / utils / regress-stage2.sh
1 #!/bin/sh 
2
3 # This script is used to setup the regression testing environment
4 # invoke the tests and record the results. It expects the following
5 # variables to be in the environment.
6 #
7 #    $BUILDSPOOL
8 #    $BRANCH            the name of the branch, or HEAD.
9 #    $TODAY             today's date.
10 #
11 # it is expected that $BUILDSPOOL/freeswan contains a checked out copy
12 # of the source tree that is ready for building. 
13 #
14 # In general, this script is in fact running from
15 #    $BUILDSPOOL/freeswan/testing/utils/regress-stage2.sh
16 #
17 # invoked from regress-nightly.sh. The two stages permit the regress-nightly.sh
18 # scritpt, which must be invoked from outside of the CVS tree to change
19 # very seldom.
20 #
21 # This script will further look for $HOME/freeswan-regress-env.sh for a list 
22 # of variables to include.
23 #
24 # This should include
25 #
26
27 # die if anything dies.
28 set -e
29
30 mkdir -p $BUILDSPOOL/UMLPOOL
31
32 umlsetup=$BUILDSPOOL/freeswan/umlsetup.sh
33
34 echo "#" `date`                                                     >$umlsetup
35 echo "POOLSPACE=$BUILDSPOOL/UMLPOOL"                               >>$umlsetup
36 echo "BUILDTOP=$BUILDSPOOL/freeswan export BUILDTOP"               >>$umlsetup
37
38 # freeswan-regress-eng.sh should have the following variables
39 # defined. This should be the only local configuration required.
40
41 # KERNPOOL=/abigail/kernel/linux-2.4.17
42 # UMLPATCH=/abigail/user-mode-linux/uml-patch-2.4.17-4.bz2
43 # BASICROOT=/abigail/user-mode-linux/root-6.0
44 # SHAREDIR=${BASICROOT}/usr/share
45 #
46 # Please see doc/umltesting.html for details on filling in these variables.
47 #
48
49 if [ -f $HOME/freeswan-regress-env.sh ]
50 then
51     cat $HOME/freeswan-regress-env.sh                              >>$umlsetup
52     . $HOME/freeswan-regress-env.sh
53 fi
54
55 echo "FREESWANDIR=\$BUILDTOP"                                      >>$umlsetup
56 echo "REGULARHOSTS='sunrise sunset nic'"                           >>$umlsetup
57 echo "FREESWANHOSTS='east west japan'"                             >>$umlsetup
58
59 # setup regression test recording area.
60 REGRESSRESULTS=${REGRESSTREE}/${BRANCH}/${TODAY} export REGRESSRESULTS
61 mkdir -p ${REGRESSRESULTS}
62
63 perl -e 'print time()."\n";' >${REGRESSRESULTS}/datestamp
64
65 cd $BUILDSPOOL/freeswan && make check
66
67 perl $BUILDSPOOL/freeswan/testing/utils/regress-summarize-results.pl $REGRESSRESULTS
68
69
70
71
72
73
74
75
76