-
Notifications
You must be signed in to change notification settings - Fork 91
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
chore(build): add option to turn off tests run #560
Conversation
Signed-off-by: Rui Chen <[email protected]>
CMakeLists.txt
Outdated
option(BUILD_TESTS "Build and run tests." ON) | ||
|
||
if(BUILD_TESTS) | ||
enable_testing() | ||
endif() | ||
|
||
enable_testing() |
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.
Generally it's advisable* to run the tests after the package build step to ensure it works with the compiler, compiler flags, system library, etc that are unique to the environment.
- Both Debian and Fedora recommend run checks after build.
The system only builds the test but does not run them by default, I wonder why we should disable ctest?
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.
for us (homerbew), we already have formula test, running build_tests, dont quite make sense (and we did disable whenever the option is available)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #560 +/- ##
=======================================
Coverage 88.22% 88.22%
=======================================
Files 58 58
Lines 13534 13534
=======================================
Hits 11940 11940
Misses 1594 1594 ☔ View full report in Codecov by Sentry. |
Thanks @kanru! |
would be also good to not run tests for the downstream packaging (as it is already done by CI)
relates to Homebrew/homebrew-core#172332