Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appveyor tests aren't using Python 3 #213

latk opened this issue Feb 13, 2018 · 2 comments

Appveyor tests aren't using Python 3 #213

latk opened this issue Feb 13, 2018 · 2 comments


Copy link

latk commented Feb 13, 2018

I am currently working on modularization. But the tests fail on Windows! It seems when the test Makefiles invoke the gcovr script, it is using this sys.path for our Python 3 tests:

../../../scripts/gcovr -r subdir -d -x -o coverage.xml
Could not find gcovr modules in:
Traceback (most recent call last):
  File "../../../scripts/gcovr", line 44, in <module>
    from import parse_arguments
ImportError: No module named
make: *** [Makefile:16: xml] Error 1

So gcovr was installed using Python 3, but we try to run it under Python 2 :/

And indeed, the appveyor.yml selects the Python version through an env variable:

    - PYTHON: C:\Python27\python.exe
    - PYTHON: C:\Python36-x64\python.exe

In the Makefile, the script is invoked like this, without using that env variable:

../../../scripts/gcovr -d -x -o coverage.xml

I assume the tests should be updated to explicitly run the selected Python, e.g.

PYTHON ?= python

	$(PYTHON) ../../../scripts/gcovr -d -x -o coverage.xml

My questions:

  • does this analysis seem sensible?
  • can someone with a Windows machine verify?
  • would someone like to contribute a fix?
Copy link

mayeut commented Feb 13, 2018

I wanted to get some coverage information for gcovr itself and for that, starting moving things around a bit. I just ran into an issue with python 3.6 on Windows which has no reason to be a result of my work and is probably a pre-existing issue, thus confirming your analysis.
I think before modularization is done, it might be a good thing to know what's the current gcovr status (and therefore, what's likely to break without anyone knowing).
I will open a PR for this work which will most probably open some discussions (and which might give you ideas on the issue you're seeing).

Copy link
Member Author

latk commented Feb 14, 2018

Seems to be fixed by #214. Thank you @mayeut !

@latk latk closed this as completed Feb 14, 2018
@latk latk removed the help wanted label Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants