Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding particular tests in Boost.Test

I need a behavior of non-existing option test_launcher --exclude_test='Benchmark*'? Is there a working mechanism in Boost.Test that can be used to achieve the same?

like image 552
bobah Avatar asked Oct 08 '14 13:10

bobah


1 Answers

In the test filtering documentation see the discussion on Relative specification used with the command-line argument --run_test.

The disabler specification format is to preface the specification with an exclamation mark (!). So for your example the following will disable any enabled tests matching the pattern Benchmark*

test_launcher --run_test=!Benchmark*

Note that on linux you'll need to add quotes to prevent the asterisk and exclamation from getting interpreted

test_launcher --run_test='!Benchmark*'
like image 98
Weston Avatar answered Oct 03 '22 12:10

Weston