[SERVER-68063] Ability to define a sub-set of unit tests as a scons target Created: 14/Jul/22  Updated: 27/Oct/23  Resolved: 27/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Charlie Swanson Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-72049 [CQF] Test all plans for a single MQL... Backlog
is related to SERVER-67724 Consolidate all CQF related tests und... Closed
is related to SERVER-69501 investigate descrepency between prove... Closed
is related to SERVER-72756 [CQF] Reduce runtime of interval perm... Closed
Assigned Teams:
Server Development Platform
Participants:

 Description   

I'd like the ability to maintain a list of "interesting" unit tests for my team to use to validate results locally (pre patch build). As an example, we might run something like this today:

ninja <FLAGS> install-devcore build/install/bin/algebra_test build/install/bin/db_pipeline_test build/install/bin/optimizer_test build/install/bin/sbe_abt_test && ./build/install/bin/algebra_test && ./build/install/bin/db_pipeline_test --fileNameFilter=pipeline_test.cpp && ./build/install/bin/optimizer_test && ./build/install/bin/sbe_abt_test && resmoke --suites=cqf,cqf_parallel,cqf_passthrough -j4

I'd like to evolve that into something more like

ninja <FLAGS> install-devcore install-cqf-unittests && resmoke --suites=cqf_unittests,cqf,cqf_parallel_cqf_passthrough -j4

install-cqf-unittests would be my new scons target which compiles only these tests:

build/install/bin/algebra_test
build/install/bin/db_pipeline_test
build/install/bin/optimizer_test
build/install/bin/sbe_abt_test

I would also need that scons invocation (ideally possible through ninja as well) to generate a list of all those tests, because that would be necessary for `resmoke.py` to be able to run that selected suite of tests in resmoke --suites=cqf_unittests,.... See this example where we need a source of all unit tests for resmoke to inspect.



 Comments   
Comment by Andrew Morrow (Inactive) [ 18/Oct/22 ]

The first part of this is already achievable by adding AIB_COMPONENT='cqf' to the relevant unittests (or to a Clone'd Environment that all the unit tests are built in). The second part, integration with resmoke, would require additional work. We would need, probably, to update the format of the unit test list file and adorn each entry with the list of components that adhere to it. Then resmoke would need to be taught how to run a specific subset of those. We could consider also just generating suite definitions directly, and getting rid of unittests.txt. But then we would need to teach resmoke about that, and it might result in a profusion of suites.

Generated at Thu Feb 08 06:09:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.