Skip to content

[newchem-cpp] mv grtest machinery into its own subdirectory#469

Merged
brittonsmith merged 6 commits intograckle-project:newchem-cppfrom
mabruzzo:ncc/factor-out-grtest
Jan 21, 2026
Merged

[newchem-cpp] mv grtest machinery into its own subdirectory#469
brittonsmith merged 6 commits intograckle-project:newchem-cppfrom
mabruzzo:ncc/factor-out-grtest

Conversation

@mabruzzo
Copy link
Collaborator

@mabruzzo mabruzzo commented Dec 18, 2025

This has been on my todo list for quite a while.

This PR primarily makes 3 interrelated changes pertaining to the grtest machinery1:

  1. renames the grtest machinery its now called grtestutils
  2. moves the grtest machinery out of tests/unit into test/grtestutils
  3. lightly refactors the CMake logic (and add additional explanatory comments) so that instead of linking against each test file against either grtestutils or testdeps, we now link them all against testdeps

This PR also:

  • addresses a TODO item from grtestutils/cmd.cpp (it reduces code duplication)
  • explicitly links all test-code against the gmock library. While this doesn't have an immediate payoff, it will be a benefit for PR [newchem-cpp] cleanup test_status_reporting.cpp #472 and another PR. To be clear: THIS DOES NOT INTRODUCE ANY DEPENDENCIES2

Footnotes

  1. Recall: the grtest machinery defines logic used to help implement unit tests.

  2. For added context, the gmock library is a component of googletest that is already being compiled as part of googletest. In other words, gmock was already an implicit dependency. By making it an explicit dependency, our test-code can access additional "matcher" functionality. (This functionality is most useful for testing strings and "containers")

@mabruzzo mabruzzo force-pushed the ncc/factor-out-grtest branch from 8f8cd0a to 8cae777 Compare December 19, 2025 13:30
For context, the gmock library is a component of googletest (it's
already being installed). All this commit does is make it possible for
us to use it in subsequent PRs
@brittonsmith brittonsmith merged commit b036653 into grackle-project:newchem-cpp Jan 21, 2026
5 checks passed
@mabruzzo mabruzzo deleted the ncc/factor-out-grtest branch January 21, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-system Related to the build-system testing test suite, regression tests, ci infrastructure

Projects

Development

Successfully merging this pull request may close these issues.

2 participants