• Dylan Baker's avatar
    framework: Add ability to set a compression method on file backends · 7be0c99c
    Dylan Baker authored
    
    
    This creates a framework for compressing results as part of the
    FileBackend class. This allows for the simple addition of compression
    formats (gz is easily possible in python2, xz in python3), but does not
    actually implement any compression. zip and bz2 compression are also
    possible, although they'll require a little more code.
    
    This patch implements a framework, and tests for that framework.
    
    The goal is that other compression methods can easily be added to piglit
    simply by setting a few values in framework/backends/compression, and
    then everything will just work.
    
    This will allow junit results that are compressed to be read, but
    doesn't add support to junit for compressing results, since junit is
    mainly intended for consumption by jenkins, which doesn't understand
    compression.
    
    v2: - replace tests decorator set_compression with use of
          utils.set_piglit_conf. This is better because it uses a generic
          tools, and because set_compression is somewhat misleading of a
          name.
    v3: - backport changes from my attempt to port this to python3. There
          are significant differences between python2 and python3 compression
          handling because of the bytes/str/unicode differences between the
          two versions. There are also code cleanups from that work here
        - Make a better effort to protect the unit tests from the
          environment around them. The goal is that the tests control the
          compression options 100%, with no chance of piglit.conf or
          environment variables affecting the tests.
        - reduce code duplication in unit tests
        - add additional unit tests as made possible by refactoring changes
    v4: - add additional unit tests
    Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
    7be0c99c
piglit.conf.example 4.22 KB