+check_timeout = 30
+
+
+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_no_nat_client"), True)
+ else:
+ shutil.rmtree ("/tmp/c_bootstrap_server/", True)
+ shutil.rmtree ("/tmp/c_no_nat_client/", True)
+
+def success_cont (check):
+ global success
+ success = True;
+
+def fail_cont (check):
+ global success
+ success = False;
+ check.eval(True)
+
+def check ():
+ check = Check (test)
+ check.add (StatisticsCondition (client, 'transport', '# peers connected',1))
+ check.add (StatisticsCondition (client, 'core', '# neighbour entries allocated',1))
+ check.add (StatisticsCondition (client, 'core', '# entries in session map',1))
+ check.add (StatisticsCondition (client, 'topology', '# peers connected',1))
+ check.add (StatisticsCondition (client, 'fs', '# peers connected',1))
+
+
+ check.add (StatisticsCondition (server, 'transport', '# peers connected',1))
+ check.add (StatisticsCondition (server, 'core', '# neighbour entries allocated',1))
+ check.add (StatisticsCondition (server, 'core', '# entries in session map',1))
+ check.add (StatisticsCondition (server, 'topology', '# peers connected',1))
+ check.add (StatisticsCondition (server, 'fs', '# peers connected',1))
+
+ check.run_blocking (check_timeout, success_cont, fail_cont)