From 04b917265ee942383b8366d9aa9c037cfa89c038 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 16 Dec 2011 16:27:59 +0000 Subject: improvements and fixes --- src/integration-tests/gnunet_testing.py.in | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'src/integration-tests/gnunet_testing.py.in') 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: -- cgit v1.2.3