Open Bug 1910524 Opened 1 year ago Updated 1 year ago

GTest documentation missing details for adding gtests

Categories

(Testing :: GTest, defect, P2)

Firefox 130
defect

Tracking

(Not tracked)

People

(Reporter: flowejam, Unassigned)

Details

Attachments

(1 file)

Attached file gtest_gfx_error.txt

Steps to reproduce:

The issue can be reproduced by following these steps:

Rearrange test files out of alphabetical order in the UNIFIED_SOURCES list in the moz.build file in /gfx/tests/gtest/ and enter the command ./mach gtest Gfx.*

Specifically, "TestArrayView.cpp" was moved above "TestArena.cpp" in the UNIFIED_SOURCES list before running the gtests.

Actual results:

The error I encountered (full mach output is in the attached gtest_gfx_error.txt file):

['mozbuild.util.UnsortedError: An attempt was made to add an unsorted sequence to a list. The incoming list is unsorted starting at element 3. We expected "TestArena.cpp" but got "TestArrayView.cpp"\n']

However, the requirement for this list to be sorted when adding a gtest is not mentioned in /docs/gtest/index.rst (https://firefox-source-docs.mozilla.org/gtest/index.html#adding-a-test-to-the-build-system). As a new contributor, this added some friction when I went to add a gtest.

Expected results:

The docs (https://firefox-source-docs.mozilla.org/gtest/index.html#adding-a-test-to-the-build-system) should mention the requirement for the list to be in alphabetical order. Or perhaps the list UNIFIED_SOURCES should be unsorted.

If possible, I would like to be assigned this issue to work on.

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

For more information, please visit BugBot documentation.

Flags: needinfo?(sledru)

sure, don't hesitate to work on it!

Component: Firefox Source Docs: Content → GTest
Flags: needinfo?(sledru)
Product: Developer Infrastructure → Testing

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)
Severity: -- → S2
Flags: needinfo?(jmaher)
Priority: -- → P2
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: