diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-03 13:06:59 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-03 13:06:59 +0000 |
commit | 598349666a7d4afd68c9b4192faf63d5ea836299 (patch) | |
tree | a490d4bd8263e1cb4f1d1651d154aea5e0f9a8de /src/integration-tests | |
parent | 07ba7a57a5b65b2bc2855c2200cff487b87f497d (diff) | |
download | gnunet-598349666a7d4afd68c9b4192faf63d5ea836299.tar.gz gnunet-598349666a7d4afd68c9b4192faf63d5ea836299.zip |
- changes
Diffstat (limited to 'src/integration-tests')
-rw-r--r-- | src/integration-tests/gnunet_testing.py.in | 4 | ||||
-rwxr-xr-x | src/integration-tests/test_integration_connection_value.py.in | 23 |
2 files changed, 14 insertions, 13 deletions
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in index 4cfa051f2..fa8af728c 100644 --- a/src/integration-tests/gnunet_testing.py.in +++ b/src/integration-tests/gnunet_testing.py.in | |||
@@ -190,10 +190,10 @@ class EqualStatisticsCondition (Condition): | |||
190 | fail = "" | 190 | fail = "" |
191 | op = " == " | 191 | op = " == " |
192 | if ((self.fulfilled == False) and (failed_only == True)): | 192 | if ((self.fulfilled == False) and (failed_only == True)): |
193 | print self.peer.id[:4] + " " + self.subsystem.ljust(12) + " " + self.result +" " + self.peer2.id[:4] + " " + self.subsystem2.ljust(12) + " " + self.result2 | 193 | 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] + " " + str(self.type) + ' condition in subsystem "' + self.subsystem.ljust(12) +'" : "' + self.name.ljust(30) +'" : (expected/real value) ' + str(self.value) + op + res + fail | 194 | #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 |
195 | elif (failed_only == False): | 195 | elif (failed_only == False): |
196 | print self.peer.id[:4] + " " + self.subsystem.ljust(12) + " " + self.result +" " + self.peer2.id[:4] + " " + self.subsystem2.ljust(12) + " " + self.result2 | 196 | print self.peer.id[:4] + " " + self.subsystem.ljust(12) + " " + str(self.result) +" " + self.peer2.id[:4] + " " + self.subsystem2.ljust(12) + " " + str(self.result2) |
197 | return self.fulfilled | 197 | return self.fulfilled |
198 | 198 | ||
199 | class Test: | 199 | class Test: |
diff --git a/src/integration-tests/test_integration_connection_value.py.in b/src/integration-tests/test_integration_connection_value.py.in index 47e4dee88..cb9a1378e 100755 --- a/src/integration-tests/test_integration_connection_value.py.in +++ b/src/integration-tests/test_integration_connection_value.py.in | |||
@@ -47,10 +47,9 @@ check_timeout = 30 | |||
47 | 47 | ||
48 | def cleanup (): | 48 | def cleanup (): |
49 | if os.name == "nt": | 49 | if os.name == "nt": |
50 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True) | 50 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_normal_client"), True) |
51 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True) | ||
52 | else: | 51 | else: |
53 | shutil.rmtree ("/tmp/c_no_nat_client/", True) | 52 | shutil.rmtree ("/tmp/c_normal_client/", True) |
54 | 53 | ||
55 | 54 | ||
56 | def success_cont (check): | 55 | def success_cont (check): |
@@ -66,13 +65,17 @@ def fail_cont (check): | |||
66 | def check_connect (): | 65 | def check_connect (): |
67 | check = Check (test) | 66 | check = Check (test) |
68 | check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'core', '# neighbour entries allocated')) | 67 | check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'core', '# neighbour entries allocated')) |
68 | #check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'core', '# entries in session map')) | ||
69 | #check.add (EqualStatisticsCondition (client, 'core', '# neighbour entries allocated', client, 'core', '# entries in session map')) | ||
69 | 70 | ||
70 | # while True == check.run_once (check_timeout, None, None): | 71 | while True: |
71 | # print "Yes" | 72 | res = check.run_once (None, None) |
73 | print "Values are equal" | ||
74 | check.evaluate (False) | ||
75 | if (False == res): | ||
76 | break | ||
77 | time.sleep (1) | ||
72 | 78 | ||
73 | res = check.run_once (None, None) | ||
74 | print "RES " + str(res) | ||
75 | |||
76 | # | 79 | # |
77 | # Test execution | 80 | # Test execution |
78 | # | 81 | # |
@@ -86,7 +89,7 @@ def run (): | |||
86 | 89 | ||
87 | test = Test ('test_integration_connection_value', verbose) | 90 | test = Test ('test_integration_connection_value', verbose) |
88 | 91 | ||
89 | client = Peer(test, './confs/c_no_nat_client.conf'); | 92 | client = Peer(test, './confs/c_normal_client.conf'); |
90 | client.start(); | 93 | client.start(); |
91 | 94 | ||
92 | if (client.started == True): | 95 | if (client.started == True): |
@@ -108,9 +111,7 @@ try: | |||
108 | run () | 111 | run () |
109 | except (KeyboardInterrupt, SystemExit): | 112 | except (KeyboardInterrupt, SystemExit): |
110 | print 'Test interrupted' | 113 | print 'Test interrupted' |
111 | server.stop () | ||
112 | client.stop () | 114 | client.stop () |
113 | client2.stop () | ||
114 | cleanup () | 115 | cleanup () |
115 | if (success == False): | 116 | if (success == False): |
116 | sys.exit(1) | 117 | sys.exit(1) |