import re
import shutil
import time
-import pexpect
from gnunet_testing import Peer
from gnunet_testing import Test
from gnunet_testing import Check
verbose = True
check_timeout = 180
+if os.name == "nt":
+ tmp = os.getenv ("TEMP")
+else:
+ tmp = "/tmp"
def cleanup ():
- if os.name == "nt":
- 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)
- shutil.rmtree ("/tmp/c_no_nat_client/", True)
+ shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True)
+ shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True)
def success_disconnect_cont (check):
check = Check (test)
check.add (StatisticsCondition (client, 'transport', '# peers connected',0))
check.add (StatisticsCondition (client, 'core', '# neighbour entries allocated',0))
- check.add (StatisticsCondition (client, 'core', '# entries in session map',0))
+ check.add (StatisticsCondition (client, 'core', '# peers connected',0))
check.add (StatisticsCondition (client, 'topology', '# peers connected',0))
check.add (StatisticsCondition (client, 'fs', '# peers connected',0))
check.run_blocking (check_timeout, success_disconnect_cont, fail_disconnect_cont)
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, 'core', '# peers connected',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, 'core', '# peers connected',1))
check.add (StatisticsCondition (server, 'topology', '# peers connected',1))
check.add (StatisticsCondition (server, 'fs', '# peers connected',1))