]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/scripts/profile_cvs.sh
__ files are removed
[helm.git] / helm / matita / scripts / profile_cvs.sh
1 #!/bin/bash
2 MARK=`date +%Y%m%d%H%M`
3 TMPDIRNAME=__${MARK}_compilation
4 CVSROOT=":ext:$USER@marcello.cs.unibo.it:/home/faculty/PROJECTS/cvs/helm"
5
6 function testit {
7   LOGTOOPT=/dev/null
8   LOGTOBYTE=/dev/null
9   export DO_TESTS_EXTRA="$MARK\t$@"
10   make tests DO_TESTS_OPTS="-no-color -twice -keep-logs"
11   make tests.opt DO_TESTS_OPTS="-no-color -twice -keep-logs"
12 }
13
14 function compile {
15   LOCALOLD=$PWD
16   cd $1
17   autoconf 1>/dev/null
18   ./configure 1>/dev/null
19   make all opt 1>/dev/null
20   cd $2
21   autoconf 1>/dev/null
22   ./configure 1>/dev/null
23   cp matita.conf.xml.sample matita.conf.xml
24   make all opt 1>/dev/null
25   cd $LOCALOLD
26 }
27
28 function run_tests {
29   LOCALOLD=$PWD
30   cd $1
31   ./matitaclean all
32   mkdir .matita
33   export OCAMLRUNPARAM='o=1000000'
34   testit "gc-off"
35   export OCAMLRUNPARAM=''
36   testit "gc-on"
37   cd $LOCALOLD
38 }
39
40 OLD=$PWD
41 rm -rf $TMPDIRNAME
42 mkdir $TMPDIRNAME
43 mkdir $TMPDIRNAME.HOME
44 cd $TMPDIRNAME
45 cvs -d $CVSROOT co helm/ocaml 1>/dev/null 2>/dev/null
46 cvs -d $CVSROOT co helm/matita 1>/dev/null 2>/dev/null
47
48 export HOME="`pwd`/../$TMPDIRNAME.HOME"
49 compile $PWD/helm/ocaml $PWD/helm/matita
50 run_tests $PWD/helm/matita > LOG 2>/dev/null
51
52 cat LOG | grep "\(OK\|FAIL\)" | grep "\(gc-on\|gc-off\)" | awk -f $PWD/helm/matita/scripts/insert.awk > INSERT.sql
53 cat INSERT.sql | mysql -u helm -h mowgli.cs.unibo.it matita
54 cd $OLD
55 #rm -rf $TMPDIRNAME