diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-16 12:25:28 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-16 12:25:28 +0000 |
commit | 4997b98b69d53d14085f0da4d7d4b002f3d59100 (patch) | |
tree | 95dc9c487b9a23124f7aae48409d18fa6c20b574 /src/integration-tests/gnunet_testing.py.in | |
parent | 17f94e7fc0dfabbbd9868b72f957209549a16b5a (diff) |
added support for interupting a test
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): 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: |