From: robk-tahoe Date: Sun, 19 Oct 2008 13:16:00 +0000 (-0700) Subject: fuse/runtests: added a 'todo' flag, surpressing failure for implementations not expec... X-Git-Url: https://git.rkrishnan.org/%3C?a=commitdiff_plain;h=8566c9751dc098647d42cc98a5a485d3649d92d2;p=tahoe-lafs%2Ftahoe-lafs.git fuse/runtests: added a 'todo' flag, surpressing failure for implementations not expected to pass since the current tests assume that the implementation responds to changes made to tahoe after mount, and impl_b prefetches and cached directory data, impl_b fails the current 'read' test suite. rather than reflect that problem in the overall failure of the runtests exit code, this adds a 'todo' flag to the implementations table, and sets the todo flag for impl_b. Thus errors will therein be reported in output, but not cause a failing exit code. --- diff --git a/contrib/fuse/runtests.py b/contrib/fuse/runtests.py index d0742477..756b8366 100644 --- a/contrib/fuse/runtests.py +++ b/contrib/fuse/runtests.py @@ -60,6 +60,7 @@ implementations = { mount_wait=True, suites=['read', ]), 'impl_b': dict(module=impl_b, + todo=True, mount_args=['--basedir', '%(nodedir)s', '%(mountpath)s', ], mount_wait=False, suites=['read', ]), @@ -190,13 +191,16 @@ class SystemTest (object): try: results = self.init_cli_layer() print '\n*** System Tests complete:' - total_failures = 0 + total_failures = todo_failures = 0 for result in results: impl_name, failures, total = result - total_failures += failures + if implementations[impl_name].get('todo'): + todo_failures += failures + else: + total_failures += failures print 'Implementation %s: %d failed out of %d.' % result if total_failures: - print '%s total failures' % total_failures + print '%s total failures, %s todo' % (total_failures, todo_failures) return 1 else: return 0 @@ -763,13 +767,14 @@ class Impl_A_UnitTests (unittest.TestCase): class ImplProcessManager(object): debug_wait = False - def __init__(self, name, module, mount_args, mount_wait, suites): + def __init__(self, name, module, mount_args, mount_wait, suites, todo=False): self.name = name self.module = module self.script = module.__file__ self.mount_args = mount_args self.mount_wait = mount_wait self.suites = suites + self.todo = todo def maybe_wait(self, msg='waiting'): if self.debug_wait: