[Piglit] [PATCH 1/3] compressed_backend_tests.py: add test to demonstrate bug in compression

Dylan Baker baker.dylan.c at gmail.com
Mon Jul 13 17:06:40 PDT 2015

Currently the compression code has no way to handle a change in
piglit.conf (which incidentally it needs to, since that happens
immediately in run mode). This results in the default mode (bz2) being
picked when a PIGLIT_COMPRESSION environment variable isn't specified,
even when a piglit.conf value is.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
 framework/tests/compressed_backend_tests.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/framework/tests/compressed_backend_tests.py b/framework/tests/compressed_backend_tests.py
index 2353c7b..fdef94b 100644
--- a/framework/tests/compressed_backend_tests.py
+++ b/framework/tests/compressed_backend_tests.py
@@ -235,3 +235,16 @@ def test_decompress_xz():
 def test_xz_output():
     """framework.backends: when using xz compression a xz file is created"""
     nt.eq_(_test_extension(), '.xz')
+ at _add_compression('foobar')
+ at utils.set_env(PIGLIT_COMPRESSION=None)
+ at utils.set_piglit_conf(('core', 'compression', 'foobar'))
+def test_update_piglit_conf():
+    """framework.backends.compression: The compression mode honors updates to piglit.conf.
+    the values in piglit.conf are subject to change. And the default
+    compression mode needs to be changed with them.
+    """
+    nt.eq_(compression.MODE, 'foobar')

More information about the Piglit mailing list