From: nejucomo Date: Tue, 29 Jan 2008 05:25:11 +0000 (-0700) Subject: Individual tests run after all the setup layers are in place. X-Git-Tag: allmydata-tahoe-0.8.0~174 X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/reliability?a=commitdiff_plain;h=b4c566efca70b90acecade618d97892ff06e68cf;p=tahoe-lafs%2Ftahoe-lafs.git Individual tests run after all the setup layers are in place. --- diff --git a/contrib/fuse/runtests.py b/contrib/fuse/runtests.py index e6d51468..1ab2c4b3 100644 --- a/contrib/fuse/runtests.py +++ b/contrib/fuse/runtests.py @@ -15,6 +15,7 @@ of tahoe-fuse.py tricky business. import sys, os, shutil, unittest, subprocess import tempfile, re, time, signal, random, httplib +import traceback import tahoe_fuse @@ -255,9 +256,27 @@ class SystemTest (object): finally: self.cleanup_dir(self.mountpoint) - def run_test_layer(self): - raise NotImplementedError() - + def run_test_layer(self, mountpoint): + total = failures = 0 + for name in dir(self): + if name.startswith('test_'): + total += 1 + print '\n*** Running test #%d: %s' % (total, name) + try: + method = getattr(self, name) + method(mountpoint) + print 'Test succeeded.' + except: + print 'Test failed (details follow):' + traceback.print_exc() + failures += 1 + + print '\n*** Testing complete: %d failured out of %d.' % (failures, total) + + # Tests: + def test_foo(self, mountpoint): + raise NotImplementedError('No tests yet...') + # Utilities: def run_tahoe(self, *args):