]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/scripts/profile_cvs.sh
shanpshot
[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   scripts/do_tests.sh -no-color ./matitac.opt $LOGTOOPT tests/*.ma
12   scripts/do_tests.sh -no-color ./matitac $LOGTOBYTE tests/*.ma
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 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" 1>/dev/null 2>/dev/null
35   testit "gc-off"
36   export OCAMLRUNPARAM=''
37   testit "gc-on" 1>/dev/null 2>/dev/null
38   testit "gc-on"
39   cd $OLD
40 }
41
42 OLD=$PWD
43 rm -rf $TMPDIRNAME
44 mkdir $TMPDIRNAME
45 cd $TMPDIRNAME
46 cvs -d $CVSROOT co helm/ocaml 1>/dev/null 2>/dev/null
47 cvs -d $CVSROOT co helm/matita 1>/dev/null 2>/dev/null
48 compile $PWD/helm/ocaml $PWD/helm/matita
49 run_tests $PWD/helm/matita > LOG
50 cat LOG | awk -f $PWD/helm/matita/scripts/insert.awk > INSERT.sql
51 cat INSERT.sql | mysql -u helm -h mowgli.cs.unibo.it matita
52 cd $OLD
53 rm -rf $TMPDIRNAME
54