[Piglit] [PATCH 0/3] Update piglit install locations

Jose Fonseca jfonseca at vmware.com
Thu May 1 05:40:21 PDT 2014

----- Original Message -----
> On Wed, Apr 30, 2014 at 10:59 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
> > I was concerned this series will create problems with the "package" target.
> >  The expectation is that the tarball produced by the "package" target will
> > have precisely the necessary layout to run the piglit testsuite in a
> > different
> > machine (without needing the source tree.)
> After fixing the issue below, I did try the package target, and it
> looked reasonable. But, I doubt that I'm testing your concern. Can you
> check it?

Thanks.  I've retested it and the build failures are fixed.

One problem is that the `piglit` script have hardcoded paths which make no sense for tarballs:

  $ tar -xOjf /home/jfonseca/work/vmware/tests/piglit/build/piglit-cmd/piglit-1.0.20140501-Linux.tar.bz2 piglit-1.0.20140501-Linux/bin/piglit
  piglit_source = '/home/jfonseca/work/vmware/tests/piglit'
  piglit_install_full_libdir = '/home/jfonseca/work/vmware/tests/piglit/publish/piglit-cmd/lib/piglit'

I think it would be much more convenient if piglit_install_full_libdir was determined automatically from

  piglit_install_full_libdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../lib/piglit'))

Also, bin/piglit should also set PIGLIT_SOURCE_DIR.  See diff below.

Otherwise sounds good to me.  I think that a top level piglit command is a nice idea.


diff --git a/piglit.in b/piglit.in
index 1290d9f..a72669c 100755
--- a/piglit.in
+++ b/piglit.in
@@ -22,10 +22,11 @@
 import sys
-import os
+import os.path
 piglit_source = '@piglit_SOURCE_DIR@'
 piglit_install_full_libdir = '@PIGLIT_INSTALL_FULL_LIBDIR@'
+piglit_install_full_libdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../lib/piglit'))
 piglit_cmd_source_path = \
     os.path.realpath(os.path.join(piglit_source, 'piglit'))
@@ -36,6 +37,7 @@ if piglit_cmd_in_source:
     piglit_run_dir = piglit_source
     piglit_run_dir = piglit_install_full_libdir
+    os.environ['PIGLIT_SOURCE_DIR'] = piglit_install_full_libdir
 sys.path.insert(0, piglit_run_dir)
 import piglit_cmd

More information about the Piglit mailing list