[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22098 - in gnunet/src: peerinfo-tool testing
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22098 - in gnunet/src: peerinfo-tool testing |
Date: |
Tue, 19 Jun 2012 10:02:47 +0200 |
Author: grothoff
Date: 2012-06-19 10:02:47 +0200 (Tue, 19 Jun 2012)
New Revision: 22098
Modified:
gnunet/src/peerinfo-tool/test_gnunet_peerinfo.py.in
gnunet/src/testing/gnunet-testing.c
Log:
-use testing to create hostkey during peerinfo tool test
Modified: gnunet/src/peerinfo-tool/test_gnunet_peerinfo.py.in
===================================================================
--- gnunet/src/peerinfo-tool/test_gnunet_peerinfo.py.in 2012-06-19 08:02:41 UTC
(rev 22097)
+++ gnunet/src/peerinfo-tool/test_gnunet_peerinfo.py.in 2012-06-19 08:02:47 UTC
(rev 22098)
@@ -35,21 +35,27 @@
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 ()
Modified: gnunet/src/testing/gnunet-testing.c
===================================================================
--- gnunet/src/testing/gnunet-testing.c 2012-06-19 08:02:41 UTC (rev 22097)
+++ gnunet/src/testing/gnunet-testing.c 2012-06-19 08:02:47 UTC (rev 22098)
@@ -131,6 +131,7 @@
fprintf (stderr, _("Could not extract hostkey %u (offset too large?)\n"),
create_no);
return 1;
}
+ (void) GNUNET_DISK_directory_create_for_file (create_hostkey);
fd = GNUNET_DISK_file_open (create_hostkey,
GNUNET_DISK_OPEN_READWRITE |
GNUNET_DISK_OPEN_CREATE,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22098 - in gnunet/src: peerinfo-tool testing,
gnunet <=