New issue
Advanced search Search tips

Issue 755417 link

Starred by 0 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: 2019-01-14
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

googletest unittests don't handle misspelled flags in a helpful way.

Project Member Reported by crouleau@chromium.org, Aug 15 2017

Issue description

Let's say I am in chromium and I build media_unittests:
$ ninja -C out/Default -j 200 media_unittests

Then I run them with a filter so only one will run: 

$ out/Default/media_unittests --gtest-filter=FFmpegDemuxerTest.Read_DiscardDisabledTextStream

If I misspell the flag as I did above, "gtest-filter" instead of "gtest_filter", then the test prints out the flags listing and then runs the tests and has a bunch of errors such as "no test result for AudioRendererAlgorithmTest.QuadraticInterpolation_Colinear". This is very specific. If I run

$ out/Default/media_unittests --gtest
or
$ out/Default/media_unittests --asdfasdfas

Then it prints the flags and then runs the tests without errors. But if I run 

$ out/Default/media_unittests --gtest-
or
$ out/Default/media_unittests --gtest-asedfgsd

Then it prints flags and then runs the tests and has a bunch of errors. So somehow the dash is important.

Two things:

1. If a flag is misspelled, then it's probably better *not* to run the tests because probably something is missing that was intended.

2. Why does that specific misspelling have that specific result?

Sorry if this is the wrong bug queue for this. Perhaps it is an issue with https://github.com/google/googletest
 
Cc: crouleau@chromium.org
Owner: ----
Owner: estaab@google.com
Hi Erik, could you please triage this?
NextAction: 2019-01-14
Yes, let me write up something about what monorail components we need so we don't lose this and I'll get back to this.
Status: Assigned (was: Untriaged)
This issue has an owner, a component and a priority, but is still listed as untriaged or unconfirmed. By definition, this bug is triaged. Changing status to "assigned". Please reach out to me if you disagree with how I've done this.
The NextAction date has arrived: 2019-01-14
Components: -Test Test>gTest

Sign in to add a comment