-fixes
[oweals/gnunet.git] / src / peerinfo-tool / test_gnunet_peerinfo.py.in
index 7a4d41c11b72ee4d91fbc2436513713e0729258b..8a954641ad2390c5592bb300387a8a463b61d889 100755 (executable)
@@ -26,7 +26,7 @@ import shutil
 import time
 
 srcdir = "../.."
-gnunet_pyexpect_dir = os.path.join (srcdir, "contrib", "gnunet_pyexpect")
+gnunet_pyexpect_dir = os.path.join (srcdir, "contrib")
 if gnunet_pyexpect_dir not in sys.path:
   sys.path.append (gnunet_pyexpect_dir)
 
@@ -42,8 +42,8 @@ elif os.name == 'nt':
 
 
 pinfo = pexpect ()
-pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf', '-L', 'ERROR'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-pinfo.expect ("stdout", re.compile (r'Error in communication with PEERINFO service\r?\n'))
+pinfo.spawn (None, [peerinfo, '-i', '-c', 'test_gnunet_peerinfo_data.conf', '-L', 'ERROR'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+pinfo.expect ("stdout", re.compile (r'Error in communication with PEERINFO service: Failed to transmit iteration request to `PEERINFO\' service\r?\n'))
 pinfo.expect ("stdout", "EOF")
 
 if os.name == "nt":
@@ -67,13 +67,13 @@ try:
   arm.communicate ()
   time.sleep (1)
 
-  pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+  pinfo.spawn (None, [peerinfo, '-i', '-c', 'test_gnunet_peerinfo_data.conf'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
   pinfo.expect ("stdout", re.compile ("Peer `.*'\r?\n"))
   m = pinfo.expect ("stdout", re.compile ("\s.*:24357\r?\n"))
   while len (m.group (0)) > 0:
     m = pinfo.expect ("stdout", re.compile ("(\s.*:24357\r?\n|\r?\n|)"))
 
-  pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf', '-n'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+  pinfo.spawn (None, [peerinfo, '-i', '-c', 'test_gnunet_peerinfo_data.conf', '-n'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
   pinfo.expect ("stdout", re.compile ("Peer `.*'\r?\n"))
   m = pinfo.expect ("stdout", re.compile ("\s.*:24357\r?\n"))
   while len (m.group (0)) > 0: