[CDRIVER-2599] Pass test options to "make test" or "make check" Created: 06/Apr/18  Updated: 28/Oct/23  Resolved: 05/May/18

Status: Closed
Project: C Driver
Component/s: cmake, tests
Affects Version/s: 1.10.0
Fix Version/s: 1.10.0

Type: Improvement Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-2593 CMake 'distcheck' strips make options... Closed
Epic Link: Remove Autotools

 Description   

When we ported the "make test" and "make check" targets from the Autotools to CMake we lost the ability to pass test arguments to the test runner. We can still do something like:

make test-libmongoc && ./test-libmongoc --no-fork

But it'd be better to make this possible with our custom "check" target:

make check TEST_ARGS="--no-fork -D -l /My/test/name"

Or even better, somehow customize the "test" target that cmake's enable_testing() function creates for us, so that it accepts arguments:

make test TEST_ARGS="--no-fork -D -l /My/test/name"



 Comments   
Comment by A. Jesse Jiryu Davis [ 05/May/18 ]

In the end, I simply updated the instructions to tell contributors to call test-libmongoc directly so they can pass command line arguments.

Comment by Githook User [ 05/May/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2599 instructions for test-libmongoc
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8d1fb7cc11e8ce042d40c87a54148a06f79bd330

Comment by A. Jesse Jiryu Davis [ 12/Apr/18 ]

Possibly?:

make test -- --no-fork -D -l /My/test/name

Generated at Wed Feb 07 21:15:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.