improvements and fixes
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 16 Dec 2011 16:27:59 +0000 (16:27 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 16 Dec 2011 16:27:59 +0000 (16:27 +0000)
src/integration-tests/gnunet_testing.py.in
src/integration-tests/test_integration_clique_nat.py.in

index d53aa1592a7e6adf6e34c9a3b709d7b1a5bd7bc1..0b7f87fa41a8241a6c2f333211154d972b052a98 100644 (file)
@@ -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:
index c8e9afefaf3cace7e3d39621fcc8c5a115fa2aff..dfcfd7c3d8747a8463d2d20aed7c0674272e3fa7 100755 (executable)
@@ -42,7 +42,7 @@ from gnunet_testing import *
 #definitions
 testname = "test_integration_clique_nat"
 verbose = True
-check_timeout = 120
+check_timeout = 30
 
 
 def cleanup ():