-
Steve Beattie authored
This patch adds a python metaclass to wrap the test methods in the subclasses of the template class AATestTemplate with the keep_on_fail function, which sets the do_cleanup attribute to False when a testcase failure occurs (i.e. an Exception is raised), and removes the manually applied decorators to the caching tests that made use of this. The downside to this approach is that the way metaclasses are declared changed between python 2 and python 3 in an incompatible way. Since python 3 is The Future™, I chose that approach and made the caching and valgrind tests which use testlib be python3 (until this change, they would have worked under either python 2 or python 3). (An output message when a failure occurs is tweaked, to make the output a little cleaner when verbose test output is requested and failures occur.) Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Christian Boltz <apparmor@cboltz.de>
85977448
To learn more about this project, read the wiki.