Opened 13 years ago

Closed 11 years ago

#3303 closed Feature Requests (wontfix)

--run_test arbitrary depth matching

Reported by: Maxim Yanchenko <Maxim.Yanchenko@…> Owned by: Gennadiy Rozental
Milestone: Boost 1.40.0 Component: test
Version: Boost 1.39.0 Severity: Optimization
Keywords: Cc: Maxim.Yanchenko@…

Description

Hi Gennady,

That's awesome that you have added the ability to run individual tests and suites by name. However, while using this feature, I found myself keeping adding "*/" before the test name and rerunning the test program until it finally matches the nesting level and run the test I need (because usually I just see the test I want to run in the source code and I don't really care how deep is it in the hierarchy).

Could you please add a possibility to match "any" nesting level?
I would suggest double-star syntax:

--run_test=/my_test

will match "my_test", "s1/my_test", "s1/s2/s3/s4/my_test" etc.

--run_test=s1//my_test

will match "s1/my_test", "s1/s2/s3/s4/my_test" etc, but will not match "my_test" and "s2/my_test".

Thanks,
Maxim

Change History (3)

comment:1 by Gennadiy Rozental, 13 years ago

do you want /a/b to filter out test case b in all sub-testsuites a on any level either?

comment:2 by Maxim Yanchenko <Maxim.Yanchenko@…>, 13 years ago

Cc: Maxim.Yanchenko@… added

yes, please, as well as /a*//b and similar, for a case when there are many tests with name "b" (say "conversion_test"), and I need one which is "somewhere" inside suite with name starting with "a" ("market_data"), no matter how many sub-suites are between them (including zero).

To me, it would be enough just to have a regexp to match versus the whole test path, but I understand it may add an unnecessary dependency on Boost.Regex which is probably undesirable.

comment:3 by Gennadiy Rozental, 11 years ago

Resolution: wontfix
Status: newclosed

I've introduced a notion of a label and an ability to run by label. I think this will be more natural in comparison to what you suggested.

Note: See TracTickets for help on using tickets.