120
|
1 #!/bin/bash
|
|
2
|
|
3 if [ ! -d output ]; then
|
|
4 mkdir output
|
|
5 fi
|
|
6
|
|
7 max=$1
|
|
8 count=$2
|
|
9 jar_path=../build/libs/
|
|
10 topo_jarname=ChristieStartTopologyManager-1.0.jar
|
|
11 torquetest_jarname=ChristieStartTorqueTestTopology-1.0.jar
|
|
12
|
|
13 mkdir -p Log
|
|
14
|
|
15 ruby ./ring.rb $1 > Log/ring.dot
|
|
16 #dot -Tpng ./topology/ring.dot > ./topology/ring.png
|
|
17 #open ./topology/ring.png
|
|
18 java -cp ${jar_path}${topo_jarname} --localPort 10000 --confFile Log/ring.dot &
|
|
19
|
|
20 sleep 3
|
|
21
|
|
22 cnt=0
|
|
23 while [ $cnt -lt $max ]
|
|
24 do
|
|
25 java -cp ${jar_path}${torquetest_jarname} --managerHost localhost --managerPort 10000 --localPort `expr 20000 + $cnt`&
|
|
26 cnt=`expr $cnt + 1`
|
|
27 done
|
|
28 wait
|