aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo-tool
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-06-19 08:02:47 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-06-19 08:02:47 +0000
commite3348644337c68915a7f0864cf20ae85f65aed8d (patch)
tree2107c29be1b9e7c31f9ed002f8fb6c7622bbd51b /src/peerinfo-tool
parent22c4d4795841ee116b3795b0bf3e087b22d39533 (diff)
-use testing to create hostkey during peerinfo tool test
git-svn-id: https://gnunet.org/svn/gnunet@22098 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/peerinfo-tool')
-rwxr-xr-xsrc/peerinfo-tool/test_gnunet_peerinfo.py.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/peerinfo-tool/test_gnunet_peerinfo.py.in b/src/peerinfo-tool/test_gnunet_peerinfo.py.in
index bff673e3b1..81acb3c8b7 100755
--- a/src/peerinfo-tool/test_gnunet_peerinfo.py.in
+++ b/src/peerinfo-tool/test_gnunet_peerinfo.py.in
@@ -35,21 +35,27 @@ from gnunet_pyexpect import pexpect
if os.name == 'posix':
peerinfo = 'gnunet-peerinfo'
gnunetarm = 'gnunet-arm'
+ gnunettesting = 'gnunet-testing'
elif os.name == 'nt':
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", "EOF")
+
if os.name == "nt":
shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-peerinfo"), True)
else:
shutil.rmtree ("/tmp/gnunet-test-peerinfo", True)
+
+# create hostkey via testing lib
+hkk = subprocess.Popen ([gnunettesting, '-n 1', '-k', '/tmp/gnunet-test-peerinfo/.hostkey'])
+hkk.communicate ()
+
arm = subprocess.Popen ([gnunetarm, '-sq', '-c', 'test_gnunet_peerinfo_data.conf'])
arm.communicate ()