[Piglit] Running piglit in chroot

Matěj Cepl mcepl at cepl.eu
Mon Feb 16 16:05:23 PST 2015


after complete failure of building on older Linux distribution 
(specifically RHEL-6 ... it is just not possible to patch out 
all development which increase the dependency requirements 
enough) I have decided to try to run the current version of 
piglit in chroot with more recent versio of Linux (RHEL_7) and 
using RHEL-6 mesa libraries via bind-mounted directory from the 

I was thinking how to change environment (particularly 
LD_LIBRARY_PATH and LIBGL_DRIVERS_PATH, right?) to be as close 
to the testing binaries but with as little as possible impact on 
the piglit itself.

Do you think that this patch could accomplish this or do you 
think there is other place (or other mean) in piglit which could 
serve me better?

Thank you in advance for any suggestions,



--- a/framework/core.py
+++ b/framework/core.py
@@ -114,6 +114,13 @@ class Options(object):
                  os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
+        # For setting another library path
+        if 'PIGLIT_LIB_DIR' in os.environ:
+            self.env.update({
+                'LD_LIBRARY_PATH': os.environ['PIGLIT_LIB_DIR'],
+                'LIBGL_DRIVERS_PATH': os.environ['PIGLIT_LIB_DIR'],
+            })
     def __iter__(self):
         for key, values in self.__dict__.iteritems():
             # If the values are regex compiled then yield their pattern

More information about the Piglit mailing list