Open Bug 1791639 Opened 3 years ago Updated 2 years ago

Newly added shared-head.js file is not put in the _tests directory when building

Categories

(Firefox Build System :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: tgiles, Unassigned)

References

Details

For context, this is a follow up from Bug 1778450. When trying to add a new shared-head.js file to browser/base/content/test, this file was not picked up by the build system although I had specified it as a support file in browser/base/content/test/keyboard/browser.ini. I was able to resolve the issue by adding this file manually to TEST_HARNESS_FILES.testing.mochitest.browser.browser.base.content.test in the browser/base/moz.build file.

Myself, along with :gijs and :standard8, thought that adding this file to the relevant browser.ini would cause the shared-head.js file to be available to head files as well as other importers of the new shared-head file...but this doesn't seem to be the case. It's entirely possible I was importing the shared-head.js file incorrectly, but when navigating via the mochitest browser I was unable to find the new shared-head.js file until I added the TEST_HARNESS_FILES append bit in the moz.build. Is adding new shared-head files via TEST_HARNESS_FILES the appropriate way to handle this issue or should the build system picked up this new file automatically?

Feel free to move this to another component if that makes more sense.

Adding a link to the relevant patch in Phabricator, because I'm most likely just going to moved the shared-head.js helper function into BrowserTestUtils so I don't have to fight eslint anymore.

Component: General → Mochitest
Product: Firefox Build System → Testing

The build system is not directly responsible for putting files in _tests, the mochitest harness is.

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)

Actually it is the build system that handles this:
https://searchfox.org/mozilla-central/rev/d85572c1963f72e8bef2787d900e0a8ffd8e6728/python/mozbuild/mozbuild/testing.py#95

It's been a long time since I've had this logic paged in though, so I'm not sure why it's not working. But yes, I also believe that simply adding it to support-files is supposed to be enough. Maybe this triggered an edge case.

Component: Mochitest → General
Flags: needinfo?(ahal)
Product: Testing → Firefox Build System

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahochheiden)
Severity: -- → S3
Flags: needinfo?(ahochheiden)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.