Bug 1428277

Summary: gcovr prints traceback when generating detailed HTML report
Product: [Fedora] Fedora Reporter: Marcel Metz <mmetz>
Component: gcovrAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcovr-3.3-4.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-15 18:21:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.