Skip to content
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

Merged
merged 2 commits into from
May 24, 2024
Merged

chore(build): add option to turn off tests run #560

merged 2 commits into from
May 24, 2024

Conversation

chenrui333
Copy link
Contributor

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

CMakeLists.txt Outdated
Comment on lines 10 to 16
option(BUILD_TESTS "Build and run tests." ON)

if(BUILD_TESTS)
enable_testing()
endif()

enable_testing()
Copy link
Member

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?

Copy link
Contributor Author

@chenrui333 chenrui333 May 24, 2024

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)

Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.22%. Comparing base (39fcafc) to head (570d70d).
Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@kanru kanru added this pull request to the merge queue May 24, 2024
Merged via the queue into chewing:master with commit df1784d May 24, 2024
20 checks passed
@chenrui333
Copy link
Contributor Author

Thanks @kanru!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants