diff options
Diffstat (limited to 'src/integration-tests/gnunet_testing.py.in')
-rw-r--r-- | src/integration-tests/gnunet_testing.py.in | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in index 3fb6221fd..4b667a270 100644 --- a/src/integration-tests/gnunet_testing.py.in +++ b/src/integration-tests/gnunet_testing.py.in | |||
@@ -134,6 +134,7 @@ class StatisticsCondition (Condition): | |||
134 | 134 | ||
135 | class Test: | 135 | class Test: |
136 | def __init__(self, testname, verbose): | 136 | def __init__(self, testname, verbose): |
137 | self.peers = list() | ||
137 | self.verbose = verbose; | 138 | self.verbose = verbose; |
138 | self.name = testname; | 139 | self.name = testname; |
139 | srcdir = "../.." | 140 | srcdir = "../.." |
@@ -153,6 +154,8 @@ class Test: | |||
153 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), testname), True) | 154 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), testname), True) |
154 | else: | 155 | else: |
155 | shutil.rmtree ("/tmp/" + testname, True) | 156 | shutil.rmtree ("/tmp/" + testname, True) |
157 | def add_peer (peer): | ||
158 | self.conditions.append(condition) | ||
156 | def p (self, msg): | 159 | def p (self, msg): |
157 | if (self.verbose == True): | 160 | if (self.verbose == True): |
158 | print msg | 161 | print msg |
@@ -167,9 +170,12 @@ class Peer: | |||
167 | def __del__(self): | 170 | def __del__(self): |
168 | if (self.started == True): | 171 | if (self.started == True): |
169 | print 'ERROR! Peer using cfg ' + self.cfg + ' was not stopped' | 172 | print 'ERROR! Peer using cfg ' + self.cfg + ' was not stopped' |
170 | self.started == False | 173 | if (ret == self.stop ()): |
171 | if (False == self.stop ()): | ||
172 | print 'ERROR! Peer using cfg ' + self.cfg + ' could not be stopped' | 174 | print 'ERROR! Peer using cfg ' + self.cfg + ' could not be stopped' |
175 | self.started == False | ||
176 | return ret | ||
177 | else: | ||
178 | return False | ||
173 | def start (self): | 179 | def start (self): |
174 | self.test.p ("Starting peer using cfg " + self.cfg) | 180 | self.test.p ("Starting peer using cfg " + self.cfg) |
175 | try: | 181 | try: |