]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/scripts/profile_cvs.sh
ocaml 3.09 transition
[helm.git] / helm / matita / scripts / profile_cvs.sh
1 #!/bin/bash
2 MARK=`date +%Y%m%d%H%M`
3 TMPDIRNAME=.__$MARK
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"
11   make tests.opt DO_TESTS_OPTS="-no-color -twice"
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 cd $TMPDIRNAME
44 cvs -d $CVSROOT co helm/ocaml 1>/dev/null 2>/dev/null
45 cvs -d $CVSROOT co helm/matita 1>/dev/null 2>/dev/null
46 compile $PWD/helm/ocaml $PWD/helm/matita
47 run_tests $PWD/helm/matita > LOG 2>/dev/null
48 cat LOG | grep "\(OK\|FAIL\)" | grep "\(gc-on\|gc-off\)" | awk -f $PWD/helm/matita/scripts/insert.awk > INSERT.sql
49 cat INSERT.sql | mysql -u helm -h mowgli.cs.unibo.it matita
50 cd $OLD
51 rm -rf $TMPDIRNAME