def skipForLogfile(fragment, msg):
    """Return a decorator that skips the test for logfiles containing fragment."""
    def testdecorator(testfunc):
        def testwrapper(self, *args, **kwargs):
            if fragment in self.logfile.filename:
                self.skipTest(msg)
            else:
                testfunc(self, *args, **kwargs)
        return testwrapper
    return testdecorator