]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/scripts/profile_cvs.sh
more makefile work
[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_TEST_OPTS="-no-color -twice"
12   make tests.opt DO_TEST_OPTS="-no-color -twice"
13 }
14
15 function compile {
16   OLD=$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   make matitac matitac.opt updater matitaclean 1>/dev/null
25   sed "s/@@OWNER@@/profiler/" matita.conf.xml.sample | sed "s/@@PREFETCH@@/false/" > matita.conf.xml
26   ./updater
27   cd $OLD
28 }
29
30 function run_tests {
31   OLD=$PWD
32   cd $1
33   export OCAMLRUNPARAM='o=1000000'
34   testit "gc-off"
35   export OCAMLRUNPARAM=''
36   testit "gc-on"
37   cd $OLD
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 | 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
52