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
Testing on Windows: how to compile under MinGW-w64? #189
Comments
In most cases all I need to build some software on Windows with MinGW-w64 compiler is to add path to compiler (i.e. Sometimes it's also necessary to change some system utils like mkdir, rmdir, etc in Makefile (not everyone has standard unix utils on Windows installed).
|
I've never used AppVeyor. I've read a little about its config and suggest to try to append to
and left other vars like this:
I'm not sure about mingw32-make. On Windows I usually use "native" make port for windows, but maybe it's just a personal preference and mingw32-make works fine. Mingw compilers understand forward slashes in paths as good as backslashes, so it shouldn't be any issues about that. For me it's usually more convenient to use unix-style forward slashes (at least there is no confusion about backslash as a line continue marker in Makefiles). Builtin windows mkdir, md, rd, del, cd, ... are not so tolerant to forward slashes in paths.
|
Thank you @goriy for those tips! The first tests have started passing! In the failing tests, there are many pathname issues as expected. I think that can be solved with another regex during output scrubbing. Somewhat troubling, many reported coverage rates are wildly off mark, possibly also related to pathname issues. This is interesting! |
I have looked at your build log. It seems that most C/C++ builds are done well.
|
CMake-based tests have started passing. I used the "MSYS Makefiles" generator. The remaining failures (shared libs and filters) look manageable. |
Also added python3 in #200 : https://ci.appveyor.com/project/mayeut/gcovr/build/1.0.39 |
Add AppVeyor CI (resolves gcovr#189)
There have been a lot of path-related problems on Windows, so I would like to add automated tests using AppVeyor. They offer a Windows-based continuous integration service similar to Travis CI. Their images provide MinGW, MSYS2, and so on.
The question is: how can I run the test suite under Windows? What environment variables must be set? What is the correct mixture of backslashes and forward slashes in path names? If anyone has managed to do that or has related tips/insights, please discuss those in this issue.
Because I don't have a Windows development machine, I'm dependent on your contributions for this.
The gcovr test suite is based on Makefiles that run the compiler (CXX) and generate gcovr reports. Some Makefiles use CMake to drive the build. The tests are driven by the
gcovr/tests/test_gcovr.py
script. The reports are then compared to baseline files.To run the tests under Linux, I set the CC, CXX, GCOV environment variables to the GCC version I want to test (should be GCC 5, else the baseline files assume slightly different coverage). Then I run
python -m nose -v
for a convenient test-runner, or invokepython gcovr/tests/test_gcovr.py
directly. See also the.travis.yml
.I've started to work on an AppVeyor config at latk/appveyor:
.appveyor.yml
. Note that this branch is rather volatile and will be rebased frequently.Currently, the tests start to run but the Makefiles fail when the compiler is invoked. But the compiler does exist when I invoke it from the cmd shell. The CMake tests want to build with Visual Studio, ignoring my CXX setting.
You can see the build logs on AppVeyor.
The available software on AppVeyor images is documented here.
I expect Windows testing to discover a lot of bugs. I want these to be figured out and resolved before any large refactoring of gcovr is started so that regressions can be prevented.
The text was updated successfully, but these errors were encountered: