[CONCPP-102] Option to Disable Tests during Production Build Created: 2022-06-20 Updated: 2023-06-28 Resolved: 2023-06-28 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C++ |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.3, 1.1.3 |
| Type: | Task | Priority: | Trivial |
| Reporter: | Aaron Kimbrell | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Hi, could there be an option to enable/disable tests being built? |
| Comments |
| Comment by Lawrin Novitsky [ 2022-06-22 ] |
|
Thank you for your report. I actually expected, that such option exists, since our other connectors usually have it, but it does not. I will add the option to suppress tests build. Not sure about only tests building - they are linked against the connector library. As a workaround - you can simply remove test/CMakeLists.txt before running cmake. cmake should still normally execute, but test targets won't be created. |
| Comment by Lawrin Novitsky [ 2022-06-22 ] |
|
I guess removing the whole test directory will have the same effect. |
| Comment by Aaron Kimbrell [ 2022-06-22 ] |
|
yes, but it makes the git tree dirty, which is annoying. |
| Comment by Lawrin Novitsky [ 2022-06-22 ] |
|
As I said - it's only a workaround. And removing CMakeLists.txt only was my first variant. |
| Comment by Lawrin Novitsky [ 2023-06-28 ] |
|
Added WITH_UNIT_TESTS option with default value ON to control if tests should be built. |