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