diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-19 08:02:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-19 08:02:47 +0000 |
commit | ebd2cf0e07c0dca2cc81282e8d7d1eb2a9dcffb0 (patch) | |
tree | 2107c29be1b9e7c31f9ed002f8fb6c7622bbd51b /src/peerinfo-tool | |
parent | 92ab0a2e11b3b3c5dec664383370d0dab3c30974 (diff) | |
download | gnunet-ebd2cf0e07c0dca2cc81282e8d7d1eb2a9dcffb0.tar.gz gnunet-ebd2cf0e07c0dca2cc81282e8d7d1eb2a9dcffb0.zip |
-use testing to create hostkey during peerinfo tool test
Diffstat (limited to 'src/peerinfo-tool')
-rwxr-xr-x | src/peerinfo-tool/test_gnunet_peerinfo.py.in | 10 |
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 bff673e3b..81acb3c8b 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 | |||
35 | if os.name == 'posix': | 35 | if os.name == 'posix': |
36 | peerinfo = 'gnunet-peerinfo' | 36 | peerinfo = 'gnunet-peerinfo' |
37 | gnunetarm = 'gnunet-arm' | 37 | gnunetarm = 'gnunet-arm' |
38 | gnunettesting = 'gnunet-testing' | ||
38 | elif os.name == 'nt': | 39 | elif os.name == 'nt': |
39 | peerinfo = 'gnunet-peerinfo.exe' | 40 | peerinfo = 'gnunet-peerinfo.exe' |
40 | gnunetarm = 'gnunet-arm.exe' | 41 | gnunetarm = 'gnunet-arm.exe' |
41 | 42 | gnunettesting = 'gnunet-testing.exe' | |
42 | |||
43 | 43 | ||
44 | pinfo = pexpect () | 44 | pinfo = pexpect () |
45 | pinfo.spawn (None, [peerinfo, '-i', '-c', 'test_gnunet_peerinfo_data.conf', '-L', 'ERROR'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 45 | pinfo.spawn (None, [peerinfo, '-i', '-c', 'test_gnunet_peerinfo_data.conf', '-L', 'ERROR'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
46 | pinfo.expect ("stdout", re.compile (r'Error in communication with PEERINFO service: Timeout transmitting iteration request to `PEERINFO\' service.\r?\n')) | 46 | pinfo.expect ("stdout", re.compile (r'Error in communication with PEERINFO service: Timeout transmitting iteration request to `PEERINFO\' service.\r?\n')) |
47 | pinfo.expect ("stdout", "EOF") | 47 | pinfo.expect ("stdout", "EOF") |
48 | 48 | ||
49 | |||
49 | if os.name == "nt": | 50 | if os.name == "nt": |
50 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-peerinfo"), True) | 51 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-peerinfo"), True) |
51 | else: | 52 | else: |
52 | shutil.rmtree ("/tmp/gnunet-test-peerinfo", True) | 53 | shutil.rmtree ("/tmp/gnunet-test-peerinfo", True) |
54 | |||
55 | # create hostkey via testing lib | ||
56 | hkk = subprocess.Popen ([gnunettesting, '-n 1', '-k', '/tmp/gnunet-test-peerinfo/.hostkey']) | ||
57 | hkk.communicate () | ||
58 | |||
53 | arm = subprocess.Popen ([gnunetarm, '-sq', '-c', 'test_gnunet_peerinfo_data.conf']) | 59 | arm = subprocess.Popen ([gnunetarm, '-sq', '-c', 'test_gnunet_peerinfo_data.conf']) |
54 | arm.communicate () | 60 | arm.communicate () |
55 | 61 | ||