Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1098170 - summary.py tries to access the "templates" dir in current dir
Summary: summary.py tries to access the "templates" dir in current dir
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: piglit
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matěj Cepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-15 12:35 UTC by Michal Domonkos
Modified: 2018-04-11 07:59 UTC (History)
2 users (show)

Fixed In Version: piglit-1-0.15.20140414GIT8775223.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-17 00:05:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Sample results.json to test with (1.22 MB, text/plain)
2014-05-15 12:37 UTC, Michal Domonkos
no flags Details

Description Michal Domonkos 2014-05-15 12:35:30 UTC
Description of problem:
Generating piglit HTML summaries doesn't work in this new upstream version.

The reason is that there's a new function generateHTML() in framework/summary.py expecting that the script be run from the piglit's own directory (on line 500 a file in the piglit's "templates" subdirectory is accessed).  Since the piglit-summary-html script, that calls the function, is in PATH after installing the RPM and thus will always be run from any directory different from the installed one, it obviously fails.

It looks like the source will have to be patched for our packaging needs to point to the correct dir but at this point I'm not really sure how that should be done correctly :)

Version-Release number of selected component (if applicable):
piglit-1-0.13.20130824GITbccdf6f.el6

How reproducible:
always

Steps to Reproduce:
1. Run piglit-summary-html /tmp/summary /tmp/results.json

Actual results:
Traceback (most recent call last):
  File "/usr/bin/piglit-summary-html", line 99, in <module>
    main()
  File "/usr/bin/piglit-summary-html", line 95, in main
    output.generateHTML(args.summaryDir, args.exclude_details)
  File "/usr/lib64/piglit/framework/summary.py", line 500, in generateHTML
    copy("templates/index.css", path.join(destination, "index.css"))
  File "/usr/lib64/python2.6/shutil.py", line 84, in copy
    copyfile(src, dst)
  File "/usr/lib64/python2.6/shutil.py", line 50, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'templates/index.css'

Expected results:
No error

Comment 1 Michal Domonkos 2014-05-15 12:37:57 UTC
Created attachment 895887 [details]
Sample results.json to test with

Comment 2 Michal Domonkos 2014-05-15 13:56:13 UTC
Update:

The most current commits appear to have this resolved; I was looking at a rather old commit where the templates dir was hardcoded.  Now the code looks like this:

  shutil.copy(path.join(self.TEMPLATE_DIR, "index.css"), path.join(destination, "index.css"))

versus the older:

  copy("templates/index.css", path.join(destination, "index.css"))

I haven't tried to build yet but this should probably be no longer an issue and we can close this bug; I'll update you shortly.

Comment 3 Matěj Cepl 2014-05-15 13:59:32 UTC
Try this build http://koji.fedoraproject.org/koji/taskinfo?taskID=6851990

Comment 4 Michal Domonkos 2014-05-15 14:12:06 UTC
(In reply to Matěj Cepl from comment #3)
> Try this build http://koji.fedoraproject.org/koji/taskinfo?taskID=6851990

I do confirm - this package is fixed (there's still a missing dependency but unrelated to this bug) so closing now.  Thanks!

Comment 5 Fedora Update System 2014-05-15 15:52:48 UTC
piglit-1-0.15.20140414GIT8775223.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/piglit-1-0.15.20140414GIT8775223.el6

Comment 6 Fedora Update System 2014-05-15 16:24:52 UTC
piglit-1-0.15.20140414GIT8775223.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/piglit-1-0.15.20140414GIT8775223.fc20

Comment 7 Fedora Update System 2014-05-16 03:03:26 UTC
Package piglit-1-0.15.20140414GIT8775223.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing piglit-1-0.15.20140414GIT8775223.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-1424/piglit-1-0.15.20140414GIT8775223.el6
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-05-16 13:29:26 UTC
piglit-1-0.16.20140414GIT8775223.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/piglit-1-0.16.20140414GIT8775223.fc20

Comment 9 Fedora Update System 2014-05-17 00:05:37 UTC
piglit-1-0.15.20140414GIT8775223.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2014-05-19 22:45:41 UTC
piglit-1-0.17.20140414GIT8775223.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/piglit-1-0.17.20140414GIT8775223.fc20

Comment 11 Fedora Update System 2014-06-11 15:41:03 UTC
piglit-1-0.19.20140414GIT8775223.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/piglit-1-0.19.20140414GIT8775223.fc20

Comment 12 Fedora Update System 2014-06-19 22:55:26 UTC
piglit-1-0.19.20140414GIT8775223.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.