New issue
Advanced search Search tips

Issue 912138 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Test are considered as failed if GTEST_SKIP() is used

Project Member Reported by sdefresne@chromium.org, Dec 5

Issue description

gtest provides a macro GTEST_SKIP() to disable a test at runtime (it can be used if it is not possible to determine at compilation time whether the test can be run or not).

Using the macro is nicer than just returning from the tests as it is marked as skipped when reporting the test statuses, like this:

  [----------] 7 tests from PrimaryAccountMutatorTest
  [ RUN      ] PrimaryAccountMutatorTest.SetSettingPrimaryAccountAllowed
  [  SKIPPED ] PrimaryAccountMutatorTest.SetSettingPrimaryAccountAllowed (6 ms)
  [ RUN      ] PrimaryAccountMutatorTest.SetPrimaryAccount


However, the bots do not like when tests are skipped like this and they report the whole test run to be a failure. Before doing that they report the following:

Failed to get out-of-band test success data, dumping full stdio below:
  Note: Google Test filter = 
  PrimaryAccountMutatorTest.AuthInProgress_SigninCancelled:...

I think the code that parse the test output should properly deal with those skipped tests. Note that the tests are considered as success if run locally when some tests are skipped with GTEST_SKIP().


 
Note: the GTEST_SKIP() was added here https://github.com/abseil/googletest/pull/1544

Sign in to add a comment