aboutsummaryrefslogtreecommitdiff
path: root/src/integration-tests
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-04-03 13:33:55 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-04-03 13:33:55 +0000
commite6015b6c65547c353a9c4d73a56e3869592bd502 (patch)
tree495933173e7295d967a4556a6a80493bad0cdd39 /src/integration-tests
parentc4de0806e7d4a0246329fcc88237903a0e291341 (diff)
downloadgnunet-e6015b6c65547c353a9c4d73a56e3869592bd502.tar.gz
gnunet-e6015b6c65547c353a9c4d73a56e3869592bd502.zip
- changes
Diffstat (limited to 'src/integration-tests')
-rw-r--r--src/integration-tests/gnunet_testing.py.in11
-rwxr-xr-xsrc/integration-tests/test_integration_connection_value.py.in3
2 files changed, 4 insertions, 10 deletions
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in
index 253797249..d935bc419 100644
--- a/src/integration-tests/gnunet_testing.py.in
+++ b/src/integration-tests/gnunet_testing.py.in
@@ -147,10 +147,8 @@ class StatisticsCondition (Condition):
147 else: 147 else:
148 fail = "" 148 fail = ""
149 op = " == " 149 op = " == "
150 if ((self.fulfilled == False) and (failed_only == True)): 150 if (((self.fulfilled == False) and (failed_only == True)) or (failed_only == False)):
151 print self.peer.id[:4] + " " +self.peer.cfg + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : (expected/real value) ' + str(self.value) + op + res + fail 151 print self.peer.id[:4] + " " +self.peer.cfg + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : (expected/real value) ' + str(self.value) + op + res + fail
152 elif (failed_only == False):
153 print self.peer.id[:4] + " " +self.peer.cfg + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : (expected/real value) ' + str(self.value) + op + res + fail
154 return self.fulfilled 152 return self.fulfilled
155 153
156# Specify two statistic values and check if they are equal 154# Specify two statistic values and check if they are equal
@@ -192,11 +190,8 @@ class EqualStatisticsCondition (Condition):
192 else: 190 else:
193 fail = "" 191 fail = ""
194 op = " == " 192 op = " == "
195 if ((self.fulfilled == False) and (failed_only == True)): 193 if (((self.fulfilled == False) and (failed_only == True)) or (failed_only == False)):
196 print self.peer.id[:4] + " " + self.subsystem.ljust(12) + " " + str(self.result) +" " + self.peer2.id[:4] + " " + self.subsystem2.ljust(12) + " " + str(self.result2) 194 print self.peer.id[:4] + ' "' + self.subsystem.ljust(12) + '" "' + self.name.ljust(30) + '" == ' + str(self.result) +" " + self.peer2.id[:4] + ' "' + self.subsystem2.ljust(12) + '" '+ self.name2.ljust(30) + '" ' + str(self.result2)
197 #print self.peer.id[:4] + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : (expected/real value) ' + str(self.value) + op + res + fail
198 elif (failed_only == False):
199 print self.peer.id[:4] + " " + self.subsystem.ljust(12) + " " + str(self.result) +" " + self.peer2.id[:4] + " " + self.subsystem2.ljust(12) + " " + str(self.result2)
200 return self.fulfilled 195 return self.fulfilled
201 196
202class Test: 197class Test:
diff --git a/src/integration-tests/test_integration_connection_value.py.in b/src/integration-tests/test_integration_connection_value.py.in
index 29b1dfaa5..38bf633dd 100755
--- a/src/integration-tests/test_integration_connection_value.py.in
+++ b/src/integration-tests/test_integration_connection_value.py.in
@@ -69,14 +69,13 @@ def check_connect ():
69 check.add (EqualStatisticsCondition (client, 'core', '# neighbour entries allocated', client, 'core', '# entries in session map')) 69 check.add (EqualStatisticsCondition (client, 'core', '# neighbour entries allocated', client, 'core', '# entries in session map'))
70 70
71 while True: 71 while True:
72 time.sleep (5)
73 check.reset() 72 check.reset()
74 res = check.run_once (None, None) 73 res = check.run_once (None, None)
75 print "Values are equal" 74 print "Values are equal"
76 check.evaluate (False) 75 check.evaluate (False)
77#if (False == res): 76#if (False == res):
78# break 77# break
79 78 time.sleep (5)
80 79
81# 80#
82# Test execution 81# Test execution