summaryrefslogtreecommitdiff
path: root/contrib/regression.sh
blob: 1f799797aca58afa6aba8dc934469baf3de92c4c (plain)
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
#!/bin/sh
cd
cd gnunet
svn up > /dev/null
H=`hostname`
echo "================START===================" >> regression.$H
RUN=`date +%0y%0m%0d%0k%0M`
uname -a >> regression.$H
date >> regression.$H
echo "Run $RUN" >> regression.$H
svn up >> regression.$H
export GNUNET_PREFIX=$HOME
export PATH=$HOME/bin:$PATH
./bootstrap >> regression.$H.$RUN  2>&1
./configure --prefix=$HOME --with-extractor=$HOME --with-microhttpd=$HOME  >> regression.$H.$RUN  2>&1
if [ $? != 0 ]
then
  echo configure failed >> regression.$H
  exit
fi
KEEP=0
make clean >> regression.$H.$RUN 2>&1
make install >> regression.$H.$RUN 2>&1
cd src
for n in `ls --hide "Makefile*"`
do
  cd $n
  if [ -f Makefile ]
  then
    make check >> ../regression.$H.$RUN.$n  2>&1
    if [ $? != 0 ]
    then
      echo Tests for $n failed >> ../regression.$H
      echo "--------- Details for $n -----------" >> ../regression.$H
      cat regression.$H.$RUN.$n >> ../regression.$H
      echo "----- End of Details for $n --------" >> ../regression.$H
      KEEP=1
    else
      echo Tests for $n succeeded >> ../regression.$H
    fi
  fi
  cd ..
done
echo "================END====================" >> regression.$H

if [ $KEEP == 0]
then
  rm regression.$H.$RUN*
  rm regression.$H
else
  svn add regression.$H > /dev/null
  svn commit -m "Regression in tests on $H" regression.$H
fi