Bug 1428277 - gcovr prints traceback when generating detailed HTML report
Summary: gcovr prints traceback when generating detailed HTML report
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcovr
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-02 07:58 UTC by Marcel Metz
Modified: 2017-03-15 18:21 UTC (History)
1 user (show)

Fixed In Version: gcovr-3.3-4.fc25
Clone Of:
Environment:
Last Closed: 2017-03-15 18:21:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github https://github.com/gcovr gcovr pull 163 0 None None None 2017-03-02 07:58:52 UTC

Description Marcel Metz 2017-03-02 07:58:23 UTC
Description of problem:

When creating a detailed HTML report gcovr prints the following traceback:

```
Traceback (most recent call last):
  File "/usr/bin/gcovr", line 2323, in <module>
    print_html_report(covdata, options.html_details)
  File "/usr/bin/gcovr", line 1593, in print_html_report
    commondir = commonpath(files)
  File "/usr/bin/gcovr", line 413, in commonpath
    for a, b in itertools.izip( dirs, common_dirs ):
```

The `itertools.izip` function was removed in python 3 and should be replaced with a call to the global `zip` function [1].  The bug [2] and a possible patch [3] were already reported/suggested to upsteam, but are not yet integrated into the upstream master.


Version-Release number of selected component (if applicable):

Name        : gcovr
Arch        : noarch
Epoch       : 0
Version     : 3.3
Release     : 2.fc25


How reproducible:

I tried to set up a minimal reproducible project but the bug only seems to occur within a more complex build setup.  The command line to trigger the issue looks like:

gcovr \
   --gcov-executable ${GCOV_EXECUTABLE} \
   --object-directory ${CMAKE_BINARY_DIR} \
   --root ${CMAKE_SOURCE_DIR} \
   --delete \
   --html \
   --html-details \
   --output ${CMAKE_PROJECT_NAME}.cov.html \

Other invocations with a simple text output or a summary html file work as expected.

Steps to Reproduce:
- see above

Actual results:
Program terminates with traceback, creating no detailed HTML report.


Expected results:
Program creates detailed HTML report and exits.

Additional info:

[1]: http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html#itertools
[2]: https://github.com/gcovr/gcovr/pull/163
[3]: https://patch-diff.githubusercontent.com/raw/gcovr/gcovr/pull/163.patch

Comment 1 Fedora Update System 2017-03-06 18:43:15 UTC
gcovr-3.3-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-536ccade30

Comment 2 Fedora Update System 2017-03-06 18:43:21 UTC
gcovr-3.3-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-536ccade30

Comment 3 Fedora Update System 2017-03-07 01:49:29 UTC
gcovr-3.3-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-536ccade30

Comment 4 Fedora Update System 2017-03-15 18:21:36 UTC
gcovr-3.3-4.fc25 has been pushed to the Fedora 25 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.