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

Unable to compile unit tests for incomplete backends #380

Open
Insomniac-Ossifrage opened this issue Apr 23, 2021 · 0 comments
Open

Unable to compile unit tests for incomplete backends #380

Insomniac-Ossifrage opened this issue Apr 23, 2021 · 0 comments

Comments

@Insomniac-Ossifrage
Copy link

This is a suggestion rather than a bug.

Currently, all of the unit tests are grouped to the utest_grppi CMake executable. In consequence, new back-ends cannot individually test the different patterns without modifying the underlying test to use a different execution policy (testing::Types<>). With the current design, CMake compiles all of the available tests even if they're not implemented. This causes static assertion errors due to unsupported patterns.

For example, a new back-end that only implements the map, reduce, and map-reduce patterns, cannot make use of their corresponding unit tests because a compilation error will occur:

static_assert failed due to requirement supports_pipeline<grppi::my_custom_execution>() "pipeline pattern is not supported by execution type"

The same error will similarly occur with all of the remaining unimplemented patterns. This could be addressed by splitting the tests into different executables.

Currently the only way to test individual unit tests (for incomplete back-ends) is to modify TYPED_TEST_SUITE(map_test, <custom_policy>,) in each desired file, and temporarily replacing <custom_policy> by a newly defined execution policy (in supported_executions.h).

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

No branches or pull requests

1 participant