[xorg-edgers] Piglit fails to run unless PYTHONPATH is specified (kludge)

Bug #1400769 reported by Daniel Manrique on 2014-12-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Provider for Plainbox - Checkbox
High
xorg crack pushers

Bug Description

This is a piglit bug but it also affects checkbox/plainbox (our provider).

Package versions are:

$ apt-cache policy piglit plainbox-provider-checkbox
piglit:
  Installed: 1.0.0~git20140502.0364f16~edgers~ubuntu14.04.1
  Candidate: 1.0.0~git20140502.0364f16~edgers~ubuntu14.04.1
  Version table:
 *** 1.0.0~git20140502.0364f16~edgers~ubuntu14.04.1 0
        500 http://ppa.launchpad.net/xorg-edgers/piglit/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
plainbox-provider-checkbox:
  Installed: 0.17+bzr3484+pkg17~ubuntu14.04.1
  Candidate: 0.17+bzr3484+pkg17~ubuntu14.04.1
  Version table:
 *** 0.17+bzr3484+pkg17~ubuntu14.04.1 0
        500 http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     0.4-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Now, running the piglit-run command on its own also barfs, so it's not caused by us mishandling things; there *is* a problem with piglit. This is the most basic, sanity-checking command listed in piglit's README:

$ piglit-run.py tests/sanity.tests results/sanity.results
Traceback (most recent call last):
  File "/usr/bin/piglit-run.py", line 187, in <module>
    main()
  File "/usr/bin/piglit-run.py", line 161, in main
    profile = framework.profile.merge_test_profiles(args.test_profile)
  File "/usr/lib/piglit/framework/profile.py", line 240, in merge_test_profiles
    profile = loadTestProfile(profiles.pop())
  File "/usr/lib/piglit/framework/profile.py", line 220, in loadTestProfile
    os.path.splitext(os.path.basename(filename))[0]))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named tests.sanity

A quick workaround to make this run is:

$ PYTHONPATH=/usr/share/piglit piglit-run.py tests/sanity.tests results/sanity.results

Note that /usr/share/piglit contains a set of python modules expected by piglit.

Also, the piglit PPA says this:

Note: Full path to the tests must be provided when using this version, they live in /usr/share/piglit/

Usage example:

piglit-run.py -t fbo -t texturing /usr/share/piglit/tests/all.tests results/fbo-texturing

but doing this results in:

Traceback (most recent call last):
  File "/usr/bin/piglit-run.py", line 187, in <module>
    main()
  File "/usr/bin/piglit-run.py", line 161, in main
    profile = framework.profile.merge_test_profiles(args.test_profile)
  File "/usr/lib/piglit/framework/profile.py", line 240, in merge_test_profiles
    profile = loadTestProfile(profiles.pop())
  File "/usr/lib/piglit/framework/profile.py", line 220, in loadTestProfile
    os.path.splitext(os.path.basename(filename))[0]))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named tests.all

Notice that the PPA advertises a 20141128 version of piglit:
http://ppa.launchpad.net/xorg-edgers/piglit/ubuntu/

But in the archive, the latest available build is indeed the one we have:
http://ppa.launchpad.net/xorg-edgers/piglit/ubuntu/pool/main/p/piglit/

Related branches

Daniel Manrique (roadmr) wrote :

For checkbox, a hacky workaround is to change the command: and add PYTHONPATH=/usr/share/piglit in the beginning.

Daniel Manrique (roadmr) wrote :

Assigning this to ~xorg-edgers since it's their piglit package showing this problem.

Changed in plainbox-provider-checkbox:
assignee: nobody → xorg crack pushers (xorg-edgers)
Daniel Manrique (roadmr) on 2014-12-09
summary: - Piglit fails to run unless PYTHONPATH is specified (kludge)
+ [xorg-edgers] Piglit fails to run unless PYTHONPATH is specified
+ (kludge)
Changed in plainbox-provider-checkbox:
importance: Undecided → High
Zygmunt Krynicki (zyga) wrote :

The piglit we've got packaged in ppa:checkbox-dev/ppa and the corresponding Debian package don't have this problem. Closing.

Changed in plainbox-provider-checkbox:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers