]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
fuse/runtests: added a 'todo' flag, surpressing failure for implementations not expec...
authorrobk-tahoe <robk-tahoe@allmydata.com>
Sun, 19 Oct 2008 13:16:00 +0000 (06:16 -0700)
committerrobk-tahoe <robk-tahoe@allmydata.com>
Sun, 19 Oct 2008 13:16:00 +0000 (06:16 -0700)
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.

contrib/fuse/runtests.py

index d07424772de3c391ba792ded250660672f595adf..756b83663ea570f68012029ea94b457aa3e70988 100644 (file)
@@ -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: