Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / contrib / psg / test.sh
1 #!/bin/bash
2
3 if [ $(uname -m) = "i686" ]; then
4         eval ulimit -s 64
5 else 
6         eval ulimit -s 128
7 fi
8
9 echo -e "\n";
10 echo '------------- Execute the edaggregation example under PSG -------------';
11 echo -e "\n";
12 java -Xmx1024m -cp lib.jar:classes:../../simgrid.jar peersim.Simulator configs/edaggregationPSG.txt
13 echo -e "\n";
14 echo '------------- Execute the edaggregation example under PS -------------';
15 echo -e "\n";
16 java -Xmx1024m -cp lib.jar:classes:../../simgrid.jar peersim.Simulator configs/edaggregation.txt
17 echo -e "\n";
18 echo '------------- Execute the chord example under PSG -------------';
19 echo -e "\n";
20 java -Xmx1024m -cp lib.jar:classes:../../simgrid.jar peersim.Simulator configs/chordPSG.txt
21 echo -e "\n";
22 echo '------------- Execute the chord example under PS -------------';
23 echo -e "\n";
24 java -Xmx1024m -cp lib.jar:classes:../../simgrid.jar peersim.Simulator configs/chord.txt
25 echo -e "\n";
26 echo '------------- Compare the 2 results PS and PSG -------------';
27 echo -e "\n";
28
29 cd outputs
30
31 ListeRep="$(find * -type d -prune)"   # liste des repertoires
32 for Rep in ${ListeRep}; do      
33         cd $Rep
34         VAR=$(diff ps.txt psg.txt)
35         if [ "${VAR}"1 = 1 ]
36                 then
37                  echo The results of diff "for" the $Rep example is '.............:)';
38         else
39                  echo The results of diff "for" the $Rep example is '.............:(';
40         fi
41         cd ..
42 done
43 echo -e "\n";
44 exit 0
45