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

Integrate GoogleTest framework for unit tests #197

Merged
merged 2 commits into from
Aug 18, 2021

Conversation

quantum-shift
Copy link
Collaborator

@quantum-shift quantum-shift commented Aug 18, 2021

package/tests/CMakeLists.txt is updated to pull the GoogleTest framework. The minimum cmake version required to pull and run dependent tests is 3.14.0.

On adding new targets dependent on gtest, please use gtest_discover_tests(target_name) to add the tests contained in the target.

A cmake option BUILD_GTESTS is added to toggle pulling and building gtest. It is turned off by default.

build-test.sh was updated to run CI with -DBUILD_GTESTS=ON

Added option to toggle pulling gtest
CMakeLists.txt Outdated Show resolved Hide resolved
@graeme-a-stewart
Copy link
Member

Could you also add a line about the BUILD_GTESTS option to README.md? Otherwise all looks good.

Updated build-test.sh to turn on building gtest
@quantum-shift
Copy link
Collaborator Author

I have made the changes, @graeme-a-stewart.

@graeme-a-stewart graeme-a-stewart merged commit 89abe35 into HSF:main Aug 18, 2021
@graeme-a-stewart
Copy link
Member

Thanks a lot @quantum-shift !

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