-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.sh
103 lines (95 loc) · 2.56 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# export PYTHONPATH=ivy/ivy/:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/local/lib:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
cp translate.py ivy/ivy
echo 'lock server'
pushd .
cd ivy/ivy
python translate.py ../../lock_server/lock_server.ivy client=2 server=1 > ../../tmp.vmt
popd
pushd .
cd avr
python avr.py --vmt ../tmp.vmt -e 4
popd
python remove.py avr/output/work_test/inv.txt > inv.txt
time ./main lock_server/lock_server inv.txt lock_server/config_lock_server.txt
echo 'lock server done!'
echo ''
echo 'leader election'
pushd .
cd ivy/ivy
python translate.py ../../leader/leader.ivy node=3 id=3 > ../../tmp.vmt
popd
pushd .
cd avr
python avr.py --vmt ../tmp.vmt -e 4
popd
python remove.py avr/output/work_test/inv.txt > inv.txt
time ./main leader/leader inv.txt leader/config_leader.txt "idn(N0) = ID0 & idn(N1) = ID1 & idn(N2) = ID2 & "
echo 'leader election done!'
echo ''
echo 'distributed lock'
pushd .
cd ivy/ivy
python translate.py ../../distributed_lock/distributed_lock.ivy node=2 epoch=4 > ../../tmp.vmt
popd
pushd .
cd avr
python avr.py --vmt ../tmp.vmt -e 4
popd
python remove.py avr/output/work_test/inv.txt > inv.txt
time ./main distributed_lock/distributed_lock inv.txt distributed_lock/config_distributed_lock.txt
echo 'distributed lock done!'
echo ''
echo 'chord ring'
pushd .
cd ivy/ivy
python translate.py ../../chord/chord.ivy node=4 > ../../tmp.vmt
popd
pushd .
cd avr
python avr.py --vmt ../tmp.vmt -e 4
popd
python remove.py avr/output/work_test/inv.txt > inv.txt
time ./main chord/chord inv.txt chord/config_chord.txt
echo 'chord ring done!'
echo ''
echo 'learning switch'
pushd .
cd ivy/ivy
python translate.py ../../switch/switch.ivy node=3 packet=1 > ../../tmp.vmt
popd
pushd .
cd avr
python avr.py --vmt ../tmp.vmt -e 4
popd
python remove.py avr/output/work_test/inv.txt > inv.txt
time ./main switch/switch inv.txt switch/config_switch.txt
echo 'learning switch done!'
echo ''
echo 'database chain replication'
pushd .
cd ivy/ivy
python translate.py ../../chain/chain.ivy transaction=3 operation=3 key=1 node=2 > ../../tmp.vmt
popd
pushd .
cd avr
python avr.py --vmt ../tmp.vmt -e 4
popd
python remove.py avr/output/work_test/inv.txt > inv.txt
time ./main chain/chain inv.txt chain/config_chain.txt
echo 'database chain replication done!'
echo ''
echo 'two phase commit'
pushd .
cd ivy/ivy
python translate.py ../../2PC/2PC.ivy node=6 > ../../tmp.vmt
popd
pushd .
cd avr
python avr.py --vmt ../tmp.vmt -e 4
popd
python remove.py avr/output/work_test/inv.txt > inv.txt
time ./main 2PC/2PC inv.txt 2PC/config_2PC.txt
echo 'two phase commit done!'
echo ''