Open Bug 1925462 Opened 22 days ago Updated 8 days ago

Make gtests run per-directory/manifest/identifier

Categories

(Testing :: General, defect, P2)

Desktop
All
defect

Tracking

(Not tracked)

People

(Reporter: Gijs, Unassigned)

Details

Individual gtests tend not to expect each other, especially not in entirely different directories / modules.

It would be nice if there was less interference between them.

Some justification here is from bug 1920674 comment 4 where a gtest failed in CI because a previous gtest had enabled color management in our graphics system.

The severity field is not set for this bug.
:jmaher, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmaher)

I am not sure how to do this, it seems we would need to support some kind of tag system or manifest system and then get the gtest harness to work with that. I have never worked on gtest, just inherited the component- so my experience with the toolchain is zero.

it appears that we run firefox -unittest with certain envvars set and it seems to discover and run all the tests.

theoretically we could make a manifest with all the tests and have python parse it and then figure out how to send a specific test file to firefox, i.e. firefox -unittest MyTestName, then Firefox would restart between each test file giving some level of separation. I am not sure how to do that, but if someone was familiar with the gtest framework, that would help.

Severity: -- → S2
Flags: needinfo?(jmaher)
Priority: -- → P2

I think it would be something like..

  1. Call mach gtest --list-tests and parse out the list of tests.
  2. Chunk based on the first part of the test name (tests are named Foo.Bar).
  3. Call mach gtest Foo.* to run each chunk.
You need to log in before you can comment on or make changes to this bug.