eskadi
eskadi

Reputation: 255

Filter Gtest based on two filters

I have multiple GTests. I would like to run only some of them based on two filters. For example, I want to run all UI properties tests. Something like: --gtest_filter=Properties and --gtest_filter=UI. I would like to use both filters in the same run. I could not find the syntax for passing 2 filters at the same time. I read this, I would like to do something like the 3rd example - *./foo_test --gtest_filter=Null:Constructor Runs any test whose full name contains either "Null" or "Constructor"*, but to run any test whose full name contains both "Null" and "Constructor". any ideas?

Upvotes: 2

Views: 3298

Answers (1)

Marko Popovic
Marko Popovic

Reputation: 4153

This is how you specify multiple filters:

 --gtest_filter=*Properties*:*UI*

EDIT: In case you want both words to be included in the filter, you can use this:

--gtest_filter=*Properties*UI*:*UI*Properties*

Upvotes: 3

Related Questions