-
Notifications
You must be signed in to change notification settings - Fork 75
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
Tests: Migrate to Catch 2.4.0+ #712
Conversation
7d54048
to
18ec939
Compare
ad3220f
to
d58835c
Compare
Switched to Catch 2.4.0+ (instead of 2.3.0+) now since I saw in tests and changelog that runtime improved further in this release. |
1acfd74
to
fb03c38
Compare
f321768
to
2d905b0
Compare
The problem is likely caused by the way that we still manually add our compiler flags for C++ instead of using target properties. I "linked"/included the external library now more old school to avoid populating the std flags twice. |
f37291e
to
c2eaae3
Compare
Is it ok if we switch to a newer CMake, e.g. 3.11+ ? Improves handling of imported targets a lot and also (3.8+) adds better control over target properties/features. |
4a9aa33
to
02216ba
Compare
Migrate from Boost.Test to Catch2 for: - compile time - stability - better native compiler support - smaller dependencies
After thinking about it some time I would prefer to include the testing framework within the project. I do not see any advantage of requiring the user to download the framework. Do you see any? |
Sure thing! Catch2 comes as a single header, either we check it in as such or download it on the fly with cmake. I am not a big fan of submodules for their usebility outside of pure meta repos. |
@BenjaminW3 can we please merge this before the other CI changes come in? I would like to avoid rebasing this a lot. |
- AppVeyor - Travis-CI
Final CI compile-time comparison (similar to here): recent develop vs. PR with caches up Catch2 fast compile not yet activated and not yet vendored into our source. |
@BenjaminW3 hurray, CI finished :) |
@BenjaminW3 Catch 2.6.0 now contains a |
Migrate from Boost.Test to Catch2 for:
CUDA
language feature)Uses catch2 in a way where most implementation parts are only compiled once in a
.cpp
file for themain()
and then linked against the test cases that pull only part of the header. Quite nifty and we could later on speed it up even more with PCHs for the tests, e.g. via cotire.Related to #481.
develop
before) and Travis-CI (develop
before) seems very well too, even including the initial docker image rebuild.Debugger Options
In case you want to break into the debugger on failures, run an individual test executable with
as
-h
will show:-a
aborts on the first error and-b
breaks into the debugger.Developers Install of Catch2
If we don't vendor a single-header version directly in Alpaka yet, which I would say we can do, install catch 2.4.0+ for yourself with user-level package managers. For example:
# (Linux/OSX) spack install catch spack load catch
or via
# (Win/Linux/OSX) conda install -c schrodinger catch2
or via conan from bincrafters (Win/Linux/OSX)
or via vcpkg (Windows)
or via aur (Arch Linux)
or just quickly build it form source and extend your
CMAKE_PREFIX_PATH