[googletest] problems when using gtest_filter with '*'

2,538 views
Skip to first unread message

Ratko Kovacina

unread,
May 3, 2010, 9:05:01 AM5/3/10
to googletes...@googlegroups.com
Hi,

I am trying to run a subset of the TCs by using --gtest_filter but it does not seem to work for me when I am using '*'.

The message is always:
>mysample2_unittest: No match.

Even if I use just --gtest_filter=* the message is same.

I am running it in Linux.

It works only when I specify full name of a specific TC.

Is there something else I need to add/configure in order to be able to select a subset of TCs ?

Thanks in advance,
Ratko.

Vlad Losev

unread,
May 3, 2010, 12:37:44 PM5/3/10
to Google C++ Testing Framework
Hi Ratko,

Can you post a short but complete program that exhibits the problem and the commands you used to compile it along with its output? We need that to understand your problem. Also, have you tried to build and run Google Test's own tests? Do gtest_unittest and gtest_filter_unittest fail on your machine?

The best way to run the tests currently is via CMake as autotools' 'make check' doesn't run gtest_filter_unittest.  See CMakeLists.txt for info on how to build and run tests with CMake.
Regards,
Vlad

Ratko Kovacina

unread,
May 3, 2010, 3:49:27 PM5/3/10
to Vlad Losev, Google C++ Testing Framework
Hi Vlad,

I figured out what was the issue - I had to put the expression between single quotations i.e. '*.testcase_name_pattern_*'

Now it works as expected.

Is this something that should be added to the instructional pages in Wiki - or it is (somehow) specific to my environment (Linux, c shell) ?

Thanks,
Ratko.

Vlad Losev

unread,
May 3, 2010, 4:18:13 PM5/3/10
to Google C++ Testing Framework
Hi Ratko,

On Mon, May 3, 2010 at 12:49 PM, Ratko Kovacina <rkov...@gmail.com> wrote:
Hi Vlad,

I figured out what was the issue - I had to put the expression between single quotations i.e. '*.testcase_name_pattern_*'

Now it works as expected.

Is this something that should be added to the instructional pages in Wiki - or it is (somehow) specific to my environment (Linux, c shell) ?

Are you using csh as your shell? Try running 'set nonomatch' then.

Thanks,
Ratko.




On Mon, May 3, 2010 at 12:37 PM, Vlad Losev <vlad...@gmail.com> wrote:
Hi Ratko,

Can you post a short but complete program that exhibits the problem and the commands you used to compile it along with its output? We need that to understand your problem. Also, have you tried to build and run Google Test's own tests? Do gtest_unittest and gtest_filter_unittest fail on your machine?

The best way to run the tests currently is via CMake as autotools' 'make check' doesn't run gtest_filter_unittest.  See CMakeLists.txt for info on how to build and run tests with CMake.

On Mon, May 3, 2010 at 6:05 AM, Ratko Kovacina <rkov...@gmail.com> wrote:
Hi,

I am trying to run a subset of the TCs by using --gtest_filter but it does not seem to work for me when I am using '*'.

The message is always:
>mysample2_unittest: No match.

Even if I use just --gtest_filter=* the message is same.

I am running it in Linux.

It works only when I specify full name of a specific TC.

Is there something else I need to add/configure in order to be able to select a subset of TCs ?

Thanks in advance,
Ratko.


Regards,
Vlad

- Vlad

Ratko Kovacina

unread,
May 3, 2010, 5:36:20 PM5/3/10
to Vlad Losev, Google C++ Testing Framework
Thanks Vlad.

'set nonomatch' helped... It's working now correctly (no longer need any quotations).

Thanks,
Ratko.
Reply all
Reply to author
Forward
0 new messages