summaryrefslogtreecommitdiff
path: root/src/integration-tests/gnunet_testing.py.in
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-12-16 16:27:59 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-12-16 16:27:59 +0000
commit04b917265ee942383b8366d9aa9c037cfa89c038 (patch)
treef5168289b7a44a03b3923261076eaf5948c14f26 /src/integration-tests/gnunet_testing.py.in
parent82f771a0779a45d69a6ae2789f10eef2a2a832b1 (diff)
improvements and fixes
Diffstat (limited to 'src/integration-tests/gnunet_testing.py.in')
-rw-r--r--src/integration-tests/gnunet_testing.py.in26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in
index d53aa1592..0b7f87fa4 100644
--- a/src/integration-tests/gnunet_testing.py.in
+++ b/src/integration-tests/gnunet_testing.py.in
@@ -125,22 +125,20 @@ class StatisticsCondition (Condition):
else:
return True
def eval(self, failed_only):
+ if (self.result == -1):
+ res = 'NaN'
+ else:
+ res = str(self.result)
+ if (self.fulfilled == False):
+ fail = " FAIL!"
+ op = " != "
+ else:
+ fail = ""
+ op = " == "
if ((self.fulfilled == False) and (failed_only == True)):
- if (self.fulfilled == False):
- fail = " FAIL!"
- op = " != "
- else:
- fail = ""
- op = " == "
- print self.peer.cfg + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : ' + str(self.value) + op + str(self.result) + fail
+ print self.peer.cfg + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : ' + str(self.value) + op + res + fail
elif (failed_only == False):
- if (self.fulfilled == False):
- fail = " FAIL!"
- op = " != "
- else:
- fail = ""
- op = " == "
- print self.peer.cfg + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : ' + str(self.value) + op + str(self.result) + fail
+ print self.peer.cfg + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : ' + str(self.value) + op + res + fail
return self.fulfilled
class Test: