How to specify multiple exclusion filters in --gtest_filter?

abyss.7 picture abyss.7 · Dec 24, 2012 · Viewed 78.1k times · Source

The question is about google-test framework. I want to run all tests excluding some according to multiple exclusion filters, like: --gtest_filter=-ABC.*:-BCD.*

Answer

Fraser picture Fraser · Dec 24, 2012

You group the patterns in the form --gtest_filter=POSTIVE_PATTERNS[-NEGATIVE_PATTERNS]

So in this case, you want --gtest_filter=-ABC.*:BCD.*