From 4997b98b69d53d14085f0da4d7d4b002f3d59100 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 16 Dec 2011 12:25:28 +0000 Subject: added support for interupting a test --- src/integration-tests/gnunet_testing.py.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 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): class Test: def __init__(self, testname, verbose): + self.peers = list() self.verbose = verbose; self.name = testname; srcdir = "../.." @@ -153,6 +154,8 @@ class Test: shutil.rmtree (os.path.join (os.getenv ("TEMP"), testname), True) else: shutil.rmtree ("/tmp/" + testname, True) + def add_peer (peer): + self.conditions.append(condition) def p (self, msg): if (self.verbose == True): print msg @@ -167,9 +170,12 @@ class Peer: def __del__(self): if (self.started == True): print 'ERROR! Peer using cfg ' + self.cfg + ' was not stopped' - self.started == False - if (False == self.stop ()): + if (ret == self.stop ()): print 'ERROR! Peer using cfg ' + self.cfg + ' could not be stopped' + self.started == False + return ret + else: + return False def start (self): self.test.p ("Starting peer using cfg " + self.cfg) try: -- cgit v1.2.3