You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should do what in-toto does: have the test runner output much more logging but only for failing tests. This should be especially useful for CI but also for developers.
Assuming we hard-code a good log level (see #1093 for potential alternatives), I think we only need roughly this in aggregate_tests.py:
class TestHandler(logging.StreamHandler):
def __init__(self):
super().__init__(self)
@property
def stream(self):
return sys.stderr
@stream.setter
def stream(self, value):
pass
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO, handlers=[TestHandler()])
# current testrunner code here...
This is because the testrunner buffering will not work with long lived loggers otherwise: the default handler caches sys.stderr value and testrunner wants to modify it between test runs (and buffering is required to only print the failing test output).