-
Notifications
You must be signed in to change notification settings - Fork 484
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
Split common tests into a common library #1174
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the only place where they're used so far and it doesn't make sense to compile them many times over when building the tests for the other backends. If these helpers are needed in the other backends tests, we should extract them into their own header and include it as necessary.
It doesn't seem useful to use GLOB without any widlcards, so replace it with just set().
This class is only used there, so don't define it in the common header.
This class seems to be completely useless, it's used by function_creator in PostgreSQL test only, so just inline it there.
vadz
force-pushed
the
split-tests
branch
2 times, most recently
from
October 23, 2024 00:50
50fd0a8
to
c0ef0bc
Compare
This allows to compile them once, instead of doing it for every backend: while this doesn't matter for the CI builds, recompiling common-tests.h a dozen times enormously slowed down local builds using all backends. Now it is compiled only once, as test-common.cpp, and all the other tests (except for the "empty" one) just link with the resulting library. Also extract some parts of this file into separate headers, that can be included only by the tests that actually need them. Note that the entire test-common.cpp probably ought to be split into multiple files, to speed up its build too, but this can be done later.
@Krzmbrzl Sorry for the extra conflicts with your PR but I'd like to merge this. I hope the conflicts won't be that difficult to resolve, and in the meanwhile this will make iterating over new tests much faster. |
This is unnecessary, this test doesn't use the database at all.
This can be avoided by using a different base test context class for the non-empty tests.
Extract tests using custom MyOptionalString type into a separate file. This commit is best viewed using Git --color-moved option.
Prepare for reusing them from other source files. Note that this requires using test_context from test-assert.h, which now has to include test-context.h.
No real changes, just further improve the physical tests structure.
This prepares for its reuse elsewhere. Note that ideally the checks using this macro should be rewritten to use CATCH matchers instead, which would result in much better output in case of a failing test, but for now don't change anything and just move the code around.
This is similar to previous commits and moves out more tests from the common tests file. This commit is best viewed using Git --color-moved option.
No changes, just move the tests to a separate file.
No real changes, just a small simplification.
No real changes, just move the tests in their own file.
Make this test more consistent with the other ones.
No real changes, just move more tests in a separate file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Avoid recompiling
common-tests.h
many, many times.