aboutsummaryrefslogtreecommitdiff
path: root/src/integration-tests/test_integration_clique.py.in
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-12-16 12:25:28 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-12-16 12:25:28 +0000
commit4997b98b69d53d14085f0da4d7d4b002f3d59100 (patch)
tree95dc9c487b9a23124f7aae48409d18fa6c20b574 /src/integration-tests/test_integration_clique.py.in
parent17f94e7fc0dfabbbd9868b72f957209549a16b5a (diff)
downloadgnunet-4997b98b69d53d14085f0da4d7d4b002f3d59100.tar.gz
gnunet-4997b98b69d53d14085f0da4d7d4b002f3d59100.zip
added support for interupting a test
Diffstat (limited to 'src/integration-tests/test_integration_clique.py.in')
-rwxr-xr-xsrc/integration-tests/test_integration_clique.py.in71
1 files changed, 44 insertions, 27 deletions
diff --git a/src/integration-tests/test_integration_clique.py.in b/src/integration-tests/test_integration_clique.py.in
index ce254ca7b..2c9a569f1 100755
--- a/src/integration-tests/test_integration_clique.py.in
+++ b/src/integration-tests/test_integration_clique.py.in
@@ -144,33 +144,50 @@ def check_connect ():
144# 144#
145# Test execution 145# Test execution
146# 146#
147 147def run ():
148success = False 148 global test
149 149 global server
150test = Test ('test_integration_disconnect', verbose) 150 global client
151 151 global success
152server = Peer(test, './confs/c_bootstrap_server.conf');
153server.start();
154
155client = Peer(test, './confs/c_no_nat_client.conf');
156client.start();
157
158client2 = Peer(test, './confs/c_no_nat_client_2.conf');
159client2.start();
160
161if ((client.started == True) and (client2.started == True) and (server.started == True)):
162 test.p ('Peers started, running check')
163 check_connect ()
164 152
165server.stop () 153 success = False
166client.stop () 154
167client2.stop () 155 test = Test ('test_integration_disconnect', verbose)
156
157 server = Peer(test, './confs/c_bootstrap_server.conf');
158 server.start();
159
160 client = Peer(test, './confs/c_no_nat_client.conf');
161 client.start();
162
163 client2 = Peer(test, './confs/c_no_nat_client_2.conf');
164 client2.start();
165
166 if ((client.started == True) and (client2.started == True) and (server.started == True)):
167 test.p ('Peers started, running check')
168 check_connect ()
169
170 server.stop ()
171 client.stop ()
172 client2.stop ()
173
174 cleanup ()
175
176 if (success == False):
177 print ('Test failed')
178 return False
179 else:
180 return True
168 181
169cleanup () 182
170 183try:
171if (success == False): 184 run ()
172 print ('Test failed') 185except (KeyboardInterrupt, SystemExit):
173 exit (1) 186 print 'Test interrupted'
174else: 187 server.stop ()
175 exit (0) 188 client.stop ()
189 client2.stop ()
190 cleanup ()
191sys.exit(success)
192
176 193