diff options
-rw-r--r-- | src/integration-tests/confs/c_nat_client.conf | 2 | ||||
-rw-r--r-- | src/integration-tests/gnunet_testing.py.in | 14 | ||||
-rwxr-xr-x | src/integration-tests/test_integration_clique_nat.py.in | 1 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/integration-tests/confs/c_nat_client.conf b/src/integration-tests/confs/c_nat_client.conf index 27e041ca7..7d7dd98e0 100644 --- a/src/integration-tests/confs/c_nat_client.conf +++ b/src/integration-tests/confs/c_nat_client.conf | |||
@@ -262,7 +262,7 @@ CONFIG = $DEFAULTCONFIG | |||
262 | BINARY = gnunet-service-arm | 262 | BINARY = gnunet-service-arm |
263 | ACCEPT_FROM = 127.0.0.1; | 263 | ACCEPT_FROM = 127.0.0.1; |
264 | ACCEPT_FROM6 = ::1; | 264 | ACCEPT_FROM6 = ::1; |
265 | DEFAULTSERVICES = topology hostlist | 265 | DEFAULTSERVICES = topology hostlist fs |
266 | UNIXPATH = /tmp/test-service-arm-46 | 266 | UNIXPATH = /tmp/test-service-arm-46 |
267 | UNIX_MATCH_UID = YES | 267 | UNIX_MATCH_UID = YES |
268 | UNIX_MATCH_GID = YES | 268 | UNIX_MATCH_GID = YES |
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in index 0b7f87fa4..cb3dc541f 100644 --- a/src/integration-tests/gnunet_testing.py.in +++ b/src/integration-tests/gnunet_testing.py.in | |||
@@ -116,8 +116,8 @@ class StatisticsCondition (Condition): | |||
116 | self.result = -1; | 116 | self.result = -1; |
117 | def check(self): | 117 | def check(self): |
118 | if (self.fulfilled == False): | 118 | if (self.fulfilled == False): |
119 | self.result = self.peer.check (self.subsystem, self.name, self.value); | 119 | self.result = self.peer.get_statistics_value (self.subsystem, self.name); |
120 | if (self.result == self.value): | 120 | if (str(self.result) == str(self.value)): |
121 | self.fulfilled = True | 121 | self.fulfilled = True |
122 | return True | 122 | return True |
123 | else: | 123 | else: |
@@ -208,15 +208,15 @@ class Peer: | |||
208 | return False | 208 | return False |
209 | self.started = False | 209 | self.started = False |
210 | return True; | 210 | return True; |
211 | def check (self, subsystem, name, value): | 211 | def get_statistics_value (self, subsystem, name): |
212 | from gnunet_pyexpect import pexpect | 212 | from gnunet_pyexpect import pexpect |
213 | server = pexpect () | 213 | server = pexpect () |
214 | server.spawn (None, [self.test.gnunetstatistics, '-c', self.cfg ,'-q','-n', name, '-s', subsystem ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 214 | server.spawn (None, [self.test.gnunetstatistics, '-c', self.cfg ,'-q','-n', name, '-s', subsystem ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
215 | #server.expect ("stdout", re.compile (r"")) | 215 | #server.expect ("stdout", re.compile (r"")) |
216 | test = server.read("stdout", 10240) | 216 | test = server.read("stdout", 10240) |
217 | if (test.find(str(value)) == -1): | 217 | tests = test.partition('\n')[0] |
218 | return -1 | 218 | if (tests.isdigit() == True): |
219 | return tests | ||
219 | else: | 220 | else: |
220 | return value | 221 | return -1 |
221 | |||
222 | \ No newline at end of file | 222 | \ No newline at end of file |
diff --git a/src/integration-tests/test_integration_clique_nat.py.in b/src/integration-tests/test_integration_clique_nat.py.in index dfcfd7c3d..0ea0a78cf 100755 --- a/src/integration-tests/test_integration_clique_nat.py.in +++ b/src/integration-tests/test_integration_clique_nat.py.in | |||
@@ -110,7 +110,6 @@ def check_disconnect_server (): | |||
110 | 110 | ||
111 | 111 | ||
112 | def success_connect_cont (check): | 112 | def success_connect_cont (check): |
113 | check.eval(False) | ||
114 | check_disconnect_server () | 113 | check_disconnect_server () |
115 | 114 | ||
116 | 115 | ||