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

cmake // Added Ctest support for unittests #882

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@snikulov
Member

snikulov commented Jun 16, 2016

Hi all,
I've enabled ctest verification for cmake builds and tests/unit folder.
Now it is possible after build run
on Linux
make test
on Windows
ctest -VV -C <Debug|Release>

@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Jun 16, 2016

By analyzing the blame information on this pull request, we identified @billhoffman, @Sukender and @Lekensteyn to be potential reviewers

mention-bot commented Jun 16, 2016

By analyzing the blame information on this pull request, we identified @billhoffman, @Sukender and @Lekensteyn to be potential reviewers

@snikulov

This comment has been minimized.

Show comment
Hide comment
@snikulov

snikulov Jun 16, 2016

Member

@bradking Brad, could you please review and comment? Thank you!

Member

snikulov commented Jun 16, 2016

@bradking Brad, could you please review and comment? Thank you!

Show outdated Hide outdated CMakeLists.txt
@snikulov

This comment has been minimized.

Show comment
Hide comment
@snikulov

snikulov Jun 17, 2016

Member

@bradking updated and rebased into single commit.

Member

snikulov commented Jun 17, 2016

@bradking updated and rebased into single commit.

@bradking

This comment has been minimized.

Show comment
Hide comment
@bradking

bradking Jun 17, 2016

Contributor

The CTest module defines a BUILD_TESTING option that controls most of its functionality, including its call to enable_testing. The intended way to use the CTest module is to include it unconditionally and then honor its BUILD_TESTING option:

include(CTest)
if(BUILD_TESTING)
  add_subdirectory(tests)
endif()

However, curl is currently defining its own BUILD_CURL_TESTS option. It also has a code path that includes the CTest module earlier in a BUILD_DASHBOARD_REPORTS condition. These should all be reconciled.

Contributor

bradking commented Jun 17, 2016

The CTest module defines a BUILD_TESTING option that controls most of its functionality, including its call to enable_testing. The intended way to use the CTest module is to include it unconditionally and then honor its BUILD_TESTING option:

include(CTest)
if(BUILD_TESTING)
  add_subdirectory(tests)
endif()

However, curl is currently defining its own BUILD_CURL_TESTS option. It also has a code path that includes the CTest module earlier in a BUILD_DASHBOARD_REPORTS condition. These should all be reconciled.

@snikulov

This comment has been minimized.

Show comment
Hide comment
@snikulov

snikulov Jun 17, 2016

Member

@bradking So what is your proposal, exactly? Should I remove BUILD_CURL_TESTS and BUILD_DASHBOARD_REPORTS anywhere in scripts?

Member

snikulov commented Jun 17, 2016

@bradking So what is your proposal, exactly? Should I remove BUILD_CURL_TESTS and BUILD_DASHBOARD_REPORTS anywhere in scripts?

@bradking

This comment has been minimized.

Show comment
Hide comment
@bradking

bradking Jun 17, 2016

Contributor

Should I remove BUILD_CURL_TESTS and BUILD_DASHBOARD_REPORTS anywhere in scripts?

That would be the simplest solution. Since the CMake files still warn that they are poorly maintained I don't think anyone expects stability in the current options.

Contributor

bradking commented Jun 17, 2016

Should I remove BUILD_CURL_TESTS and BUILD_DASHBOARD_REPORTS anywhere in scripts?

That would be the simplest solution. Since the CMake files still warn that they are poorly maintained I don't think anyone expects stability in the current options.

@snikulov

This comment has been minimized.

Show comment
Hide comment
@snikulov

snikulov Jun 20, 2016

Member

@bradking updated.

Member

snikulov commented Jun 20, 2016

@bradking updated.

@bradking

This comment has been minimized.

Show comment
Hide comment
@bradking

bradking Jun 20, 2016

Contributor

The change itself looks good. Please squash in the fixups and revise the commit message to explain the new logic change.

Contributor

bradking commented Jun 20, 2016

The change itself looks good. Please squash in the fixups and revise the commit message to explain the new logic change.

CMake build now using BUILD_TESTING=ON/OFF (default is OFF) to build
tests and enabling CTest integration.
Options BUILD_CURL_TESTS and BUILD_DASHBOARD_REPORTS was removed.
@snikulov

This comment has been minimized.

Show comment
Hide comment
@snikulov

snikulov Jun 21, 2016

Member

@bradking Done.

@bagder Daniel, Could you please merge?

Member

snikulov commented Jun 21, 2016

@bradking Done.

@bagder Daniel, Could you please merge?

@bagder bagder closed this in 12e21fa Jun 21, 2016

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Jun 21, 2016

Member

Done, thanks!

Small nit: please make the commit message to follow our commit styles and I'll have an easier job merging your work!

Member

bagder commented Jun 21, 2016

Done, thanks!

Small nit: please make the commit message to follow our commit styles and I'll have an easier job merging your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment