This series implements a framework for compressing results in piglit. The design is such that compression only happens at the end, when writing the final muxed file. This framework makes it easy for a backend to implement support for compression, and makes it easy to add additional compression formats, simply by adding a couple of lines to framework/backends/compression.py.
This is primarily aimed at the json backend, since junit is meant mainly for consumption by jenkins, which doesn't understand compressed results. However, the implementation is such that piglit can consume compressed junit (as much as junit is supported for reading right now), though it doesn't support creating compressed junit. gzip and bzip2 are added, and the superior bzip2 format is set as the default. There are two methods provided for changing the compression format, either by setting [core]:compression in piglit.conf, or by setting PIGLIT_COMPRESSION in the environment. This has been tested against Python 3 as well, and requires only a very small patch to continue working. Dylan Baker (3): framework: Add ability to set a compression method on file backends framework: add support for gzip compressionn framework: add support for bz2 compression. framework/backends/__init__.py | 73 ++++++++++++--------- framework/backends/abstract.py | 33 ++++++++-- framework/backends/compression.py | 96 ++++++++++++++++++++++++++++ framework/backends/json.py | 38 ++++++----- framework/backends/junit.py | 2 +- framework/tests/backends_tests.py | 4 +- framework/tests/compressed_backend_tests.py | 90 ++++++++++++++++++++++++++ framework/tests/json_backend_tests.py | 37 ++++++++--- framework/tests/json_results_update_tests.py | 21 +++++- framework/tests/json_tests.py | 18 ++++++ framework/tests/junit_backends_tests.py | 38 +++++++---- framework/tests/utils.py | 1 - piglit.conf.example | 5 ++ 13 files changed, 379 insertions(+), 77 deletions(-) create mode 100644 framework/backends/compression.py create mode 100644 framework/tests/compressed_backend_tests.py -- 2.4.3 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit