Search code examples
googletest

How to specify multiple exclusion filters in --gtest_filter?


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.*


Solution

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

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