- update default values, eliminate obsolete ones
[oweals/gnunet.git] / src / peerinfo-tool / test_gnunet_peerinfo.py.in
index 81acb3c8b74d0ca53a67f5e79becc6b8bda1a483..97fb5dfa5aad9b729e46264540569b52fc02d58d 100755 (executable)
@@ -4,7 +4,7 @@
 #
 #    GNUnet is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published
-#    by the Free Software Foundation; either version 2, or (at your
+#    by the Free Software Foundation; either version 3, or (at your
 #    option) any later version.
 #
 #    GNUnet is distributed in the hope that it will be useful, but
@@ -33,17 +33,17 @@ if gnunet_pyexpect_dir not in sys.path:
 from gnunet_pyexpect import pexpect
 
 if os.name == 'posix':
-  peerinfo = 'gnunet-peerinfo'
+  peerinfo = './gnunet-peerinfo'
   gnunetarm = 'gnunet-arm'
   gnunettesting = 'gnunet-testing'
 elif os.name == 'nt':
-  peerinfo = 'gnunet-peerinfo.exe'
+  peerinfo = './gnunet-peerinfo.exe'
   gnunetarm = 'gnunet-arm.exe'
   gnunettesting = 'gnunet-testing.exe'
 
 pinfo = pexpect ()
 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: Timeout transmitting iteration request to `PEERINFO\' service.\r?\n'))
+pinfo.expect ("stdout", re.compile (r'Service `peerinfo\' is not running, please start GNUnet\r?\n'))
 pinfo.expect ("stdout", "EOF")
 
 
@@ -64,7 +64,7 @@ try:
   pinfo.expect ("stdout", re.compile (r'I am peer `.*\'.\r?\n'))
 
   pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf', '-qs'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-  pinfo.expect ("stdout", re.compile (r'.......................................................................................................\r?\n'))
+  pinfo.expect ("stdout", re.compile (r'....................................................\r?\n'))
 
   pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf', 'invalid'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
   pinfo.expect ("stdout", re.compile (r'Invalid command line argument `invalid\'\r?\n'))
@@ -88,7 +88,7 @@ try:
   pinfo.spawn (None, [peerinfo, '-c', 'test_gnunet_peerinfo_data.conf', '-qs'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
   pid = pinfo.read ("stdout")
   pid.strip ()
-  
+
 finally:
   arm = subprocess.Popen ([gnunetarm, '-eq', '-c', 'test_gnunet_peerinfo_data.conf'])
   arm.communicate ()