Android 'mach mochitest' fails: "A cross-directory support file path noted in a test manifest does not appear in any other manifest."

RESOLVED FIXED in Firefox 63

Status

defect
RESOLVED FIXED
2 years ago
Last month

People

(Reporter: gbrown, Assigned: miker)

Tracking

57 Branch
mozilla63
Points:
---

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

In a Firefox for Android context, 'mach mochitest' consistently fails:

$ ./mach mochitest
Error running mach:

    ['mochitest']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

Exception: A cross-directory support file path noted in a test manifest does not appear in any other manifest.
 "devtools/client/framework/test/shared-head.js" must appear in another test manifest to specify an install for "!/devtools/client/framework/test/shared-head.js".

  File "/home/gbrown/src/testing/mochitest/mach_commands.py", line 321, in run_mochitest_general
    driver.install_tests(tests)
  File "/home/gbrown/src/python/mozbuild/mozbuild/controller/building.py", line 1290, in install_tests
    '_tests', test_objs)
  File "/home/gbrown/src/python/mozbuild/mozbuild/testing.py", line 254, in install_test_files
    _resolve_installs(install_info.deferred_installs, topobjdir, manifest)
  File "/home/gbrown/src/python/mozbuild/mozbuild/testing.py", line 194, in _resolve_installs
    'for "!/%s".' % (path, path))
:ahal - Do you know what this exception means? Desktop tests seem OK. Most devtools tests are skipped on Android -- maybe related?
Flags: needinfo?(ahalberstadt)
Yeah, the last paragraph of the support-files section:
https://firefox-source-docs.mozilla.org/build/buildsystem/test_manifests.html#recognized-metadata

So I think this means that there is a manifest somewhere in an external directory (possibly only included on android?) that is trying to include devtools/client/framework/test/shared-head.js in its support-files. The error happens because that file isn't included in any other support-files sections (because it no longer exists).

Assuming shared-head.js was simply renamed to head.js, you likely just have to update the filename in the manifest causing the failure.
Flags: needinfo?(ahalberstadt)
On android 'devtools/client' is not built[1], but 'devtools/server/tests/browser/browser.ini' uses '!/devtools/client/shared/test/shared-head.js'[2].

It seems this shared file needs to be moved into 'devtools/shared/tests/browser'

[1] https://searchfox.org/mozilla-central/rev/c217fbde244344fedfd07b57a740c694a456dbca/devtools/moz.build#10
[2] https://searchfox.org/mozilla-central/rev/c217fbde244344fedfd07b57a740c694a456dbca/devtools/server/tests/browser/browser.ini#27
FWIW, to get thing going locally, I just wiped out the line in server stuff requiring shared-head.js[1].

Ryan, do you have any thoughts on how we could fix this up?


[1]https://searchfox.org/mozilla-central/rev/c217fbde244344fedfd07b57a740c694a456dbca/devtools/server/tests/browser/browser.ini#27
Flags: needinfo?(jryans)
I have always been a bit bothered by the `devtools/server/tests/browser` directory as a whole because (in my opinion) the server shouldn't assume a browser at all, so it's not really ideal in multiple ways...

We don't run DevTools browser tests outside of desktop Firefox, so perhaps a reasonable fix is to exclude that test manifest in moz.build?

In devtools/server/moz.build, we could add `if CONFIG['MOZ_BUILD_APP'] == 'browser':` to guard the `BROWSER_CHROME_MANIFESTS` line.

However, Fennec never runs any browser chrome tests...  Should we just ignore all such test manifests for Fennec?  It's unclear to me why we're trying to process them at all.  Maybe :ahal has an opinion on that part.
Flags: needinfo?(jryans) → needinfo?(ahalberstadt)
I think guarding against the inclusion in moz.build is a reasonable solution (though maybe use MOZ_BUILD_APP != 'android' just in case). As for why we don't just ignore all BROWSER_CHROME_MANIFESTS on Android, I'm not sure. I suspect implementing that across the board would also be on the table, though I'd defer to a build peer (maybe :chmanchester?) for that.
Flags: needinfo?(ahalberstadt)
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #5)
> In devtools/server/moz.build, we could add `if CONFIG['MOZ_BUILD_APP'] ==
> 'browser':` to guard the `BROWSER_CHROME_MANIFESTS` line.

That sounded like a good idea, but I tried it and it did not help. :(
Julian, Michael: Do you have any suggestions you can provide? This is a real pain attempting to work with ./mach mochitest for android devices.
Flags: needinfo?(mratcliffe)
Flags: needinfo?(jdescottes)
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Flags: needinfo?(mratcliffe)
Comment on attachment 9003785 [details]
Bug 1435429 - Android 'mach mochitest' fails: 'A cross-directory support file path noted in a test manifest does not appear in any other manifest.'

Bob, this is untested but if you could test it for us then that would be great.

If it works it would also be great if you could review it.
Flags: needinfo?(jdescottes)
Attachment #9003785 - Flags: review?(bob)
Not sure if you were notified, but it didn't work for me. Commented on Phab.
Attachment #9003785 - Flags: review?(bob) → review-
Posted patch D4214-2.diff (obsolete) — Splinter Review
This additional patch applied on top of yours works for me.
Perfect... I just need to hunt down a build peer for review so I guess I will use chmanchester, who was mentioned in a previous comment.
Attachment #9004104 - Attachment is obsolete: true
Attachment #9003785 - Attachment is obsolete: true
Attachment #9003785 - Attachment is obsolete: false
Attachment #9003785 - Flags: review- → review?(cmanchester)
Comment on attachment 9003785 [details]
Bug 1435429 - Android 'mach mochitest' fails: 'A cross-directory support file path noted in a test manifest does not appear in any other manifest.'

Bob Clary [:bc:] has approved the revision.
Attachment #9003785 - Flags: review+
Comment on attachment 9003785 [details]
Bug 1435429 - Android 'mach mochitest' fails: 'A cross-directory support file path noted in a test manifest does not appear in any other manifest.'

Chris Manchester (:chmanchester) has approved the revision.
Attachment #9003785 - Flags: review+
Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ae13aec18c6c
Android 'mach mochitest' fails: 'A cross-directory support file path noted in a test manifest does not appear in any other manifest.' r=bc,chmanchester
Comment on attachment 9003785 [details]
Bug 1435429 - Android 'mach mochitest' fails: 'A cross-directory support file path noted in a test manifest does not appear in any other manifest.'

r+ already granted via phabricator.
Attachment #9003785 - Flags: review?(cmanchester)
https://hg.mozilla.org/mozilla-central/rev/ae13aec18c6c
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
See Also: → 1557417
You need to log in before you can comment on or make changes to this bug.