From: Matthias Wachs Date: Fri, 16 Dec 2011 17:15:23 +0000 (+0000) Subject: (no commit message) X-Git-Tag: initial-import-from-subversion-38251~15614 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6853afe24f91945f44593fa039b80a21dfd55e8d;p=oweals%2Fgnunet.git --- 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 BINARY = gnunet-service-arm ACCEPT_FROM = 127.0.0.1; ACCEPT_FROM6 = ::1; -DEFAULTSERVICES = topology hostlist +DEFAULTSERVICES = topology hostlist fs UNIXPATH = /tmp/test-service-arm-46 UNIX_MATCH_UID = YES 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): self.result = -1; def check(self): if (self.fulfilled == False): - self.result = self.peer.check (self.subsystem, self.name, self.value); - if (self.result == self.value): + self.result = self.peer.get_statistics_value (self.subsystem, self.name); + if (str(self.result) == str(self.value)): self.fulfilled = True return True else: @@ -208,15 +208,15 @@ class Peer: return False self.started = False return True; - def check (self, subsystem, name, value): + def get_statistics_value (self, subsystem, name): from gnunet_pyexpect import pexpect server = pexpect () server.spawn (None, [self.test.gnunetstatistics, '-c', self.cfg ,'-q','-n', name, '-s', subsystem ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) #server.expect ("stdout", re.compile (r"")) test = server.read("stdout", 10240) - if (test.find(str(value)) == -1): - return -1 + tests = test.partition('\n')[0] + if (tests.isdigit() == True): + return tests else: - return value - + return -1 \ 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 (): def success_connect_cont (check): - check.eval(False) check_disconnect_server ()