Skip to content

gtest sharding breaks lit's xfail inputs #102264

Open
@kendalharland

Description

@kendalharland

Lit marks tests as XFAIL by generating a list of discovered_tests and marking each of them as XFAIL if their relative filenames or fullnames appear in its opts.xfail which is populated from either the --xfail-tests flag or LIT_XFAIL env var before the tests actually run. When gtest sharding is enabled, every test's name in discovered_tests initially contains a numeric suffix like FooTest\1\2 before the tests runs, so the test names don't match the names the User passes to the arguments above. The googletest module will replace these numbers with the actual test suite and case names by reading them from gtest json files only after the tests are finished running. This means that it's impossible to mark a test as XFAIL using the above mechanisms when gtest sharding is enabled. One can only use the Python test decorators, or the shell test XFAIL: headers, or any of the other source-code based mechanisms.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions