8000 Appveyor tests aren't using Python 3 · Issue #213 · gcovr/gcovr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Appveyor tests aren't using Python 3 #213
Closed
@latk

Description

@latk

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:

./subdir/B/testcase
../../../scripts/gcovr -r subdir -d -x -o coverage.xml
Could not find gcovr modules in:
C:\projects\gcovr\scripts
C:\windows\SYSTEM32\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
Traceback (most recent call last):
  File "../../../scripts/gcovr", line 44, in <module>
    from gcovr.app import parse_arguments
ImportError: No module named gcovr.app
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:

environment:
  matrix:
    - 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

xml:
	$(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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0