def cleanup ():
if os.name == "nt":
- shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True)
+ shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_bootstrap_server"), True)
shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True)
else:
shutil.rmtree ("/tmp/c_bootstrap_server/", True)
def fail_disconnect_cont (check):
global success
success = False;
- check.eval(True)
+ check.evaluate(True)
def check_disconnect ():
def fail_connect_cont (check):
global success
success= False;
- check.eval(True)
+ check.evaluate(True)
def check_connect ():
check.add (StatisticsCondition (server, 'topology', '# peers connected',1))
check.add (StatisticsCondition (server, 'fs', '# peers connected',1))
- check.run_blocking (10, success_connect_cont, fail_connect_cont)
+ check.run_blocking (check_timeout, success_connect_cont, fail_connect_cont)
#
# Test execution
#
-#
-# Test execution
-#
def run ():
+ global success
global test
global server
global client
- global success
success = False
server.stop ()
client.stop ()
cleanup ()
-sys.exit(success)
+if (success == False):
+ sys.exit(1)
+else:
+ sys.exit(0)
\ No newline at end of file