-
Notifications
You must be signed in to change notification settings - Fork 758
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
Catch2 fixes #466
Catch2 fixes #466
Conversation
Ok, I've just narrowed down the problem. For Line 2186 in 18db456
so, it is possible to use these comparison operators with both types. But with Catch a problem arose, because Unfortunately, I'm not used to the API of the library, so I would have to dig a bit to understand what's better to do (e.g. enabling the I don't know if you want me to open an issue about this, or if we want to keep it here and solve it directly. |
The provisioning of Catch is definitely not optimal, so thanks for taking care of this! However, the Travis builds are failing because they only have CMake 3.9.5 (https://travis-ci.org/github/zeromq/cppzmq/jobs/752508762#L1321). In general, I think it would be ok to raise the minimum CMake version, if it can be made available there without increasing build times excessively. But this would need to be done as part of this PR, or in a separate PR that is merged before this. Could you give that a look? The Windows builds are failing because of another problem, I think that's the one you mentioned. |
I never configured Travis, but I'm exploring what we can do. The easiest thing that should not change the time of building would be to upgrade images for linux and osx. I don't know if it is a viable solution or there is any major constraint.
Then the game would move to keeping the right compiler. The alternative, AFAICT, for osx would be to manually build cmake, while for linux we can look for a repository/PPA that provides the right version. In the meanwhile, as soon as I'll have enough time, I will try to run Travis on my local machine, so I can test different configurations more easily.
In order to address this, base on the #466 (comment), I would open a PR with a very basic proposal. |
For the comparison I would suggest adding
(and !=, and socket vs socket_ref) instead of the const trick to keep everything as const correct as possible |
TODO
|
"Note that the exception type is extended with const& and you should not include it yourself." according to https://github.com/catchorg/Catch2/blob/devel/docs/assertions.md#exceptions
@@ -35,6 +34,5 @@ build: | |||
verbosity: normal | |||
|
|||
test_script: | |||
- cp libzmq/bin/libzmq*.dll Build/bin/%configuration%/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was creating a problem because the folder was not there (if I get it correctly, %configuration%
refers to the Visual Studio MS build) and it was failing the test.
I don't have any experience at all with AppVeyor, look forward your comments on how to fix this or it is ok like this (I don't know why it was needed and/or if it breaks anything in terms of AppVeyor build caches).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gummif at least now, without this copy, all tests passed! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it strange that no tests are being run (see No tests were found!!! in the logs), it has been this way for at least a year, so that it unrelated to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, you're right! I will give it a look. I will open a dedicated PR for that, it is not strictly related to this one, but since this PR changes the test part, I think it would be worth fixing it before, so we can check that everything works also on Windows platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't worry too much about it, I would like to move to github actions soon instead of travis/appveyor which should make managing the CI easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if you want to skip this problem on the windows CI, feel free to review the PR. On my side it should be ok.
I tried building via spack and I stumbled across a few building problems.
I started addressing them, even if I'm not an expert of CMake/Catch2/ZMQ, but I hope it is useful and it is in line with what you are trying to achieve. Otherwise, feel free to discard this PR.
Main points:
<catch2/catch.hpp>
CHECK_THROWS_AS
as suggested in their docThere still is a problem involving
socket_ref
and comparison operators, that I quickly workaround (not committed). I'll investigate further and in case I will open an issue to understand the best way to fix it.