Closed Bug 1494304 Opened Last year Closed Last year

"mach test browser/components/extensions/test/browser/" fails due to: "head.js appears multiple times in a test manifest under a support-files field"

Categories

(WebExtensions :: General, defect, P1)

defect

Tracking

(firefox-esr60 unaffected, firefox62 unaffected, firefox63 unaffected, firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox-esr60 --- unaffected
firefox62 --- unaffected
firefox63 --- unaffected
firefox64 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

(Keywords: regression)

Attachments

(1 file)

I can't run a specific browser test any more, let alone a whole directory.
This is because bug 1494023 adds head.js to support-files of browser.ini, while browser-common.ini itself also includes head.js
I locally reverted the patch from bug 1494023 and the bug went away.
And even without the patch, I was not able to reproduce the issue from bug 1494023 (using an artifact build on Linux).

$ mach test browser/components/extensions/test/browser/
Build configuration changed. Regenerating backend.
No handlers could be found for logger "mozbuild.frontend.reader"
Error running mach:

    ['test', 'browser/components/extensions/test/browser/']

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:

ValueError: head.js appears multiple times in a test manifest under a support-files field, please omit the duplicate entry.

  File "/path/to/gecko/testing/mach_commands.py", line 169, in test
    argv=extra_args, test_objects=tests, **kwargs)
  File "/path/to/gecko/python/mach/mach/registrar.py", line 129, in dispatch
    return self._run_command_handler(handler, context=context, **kwargs)
  File "/path/to/gecko/python/mach/mach/registrar.py", line 90, in _run_command_handler
    result = fn(**kwargs)
  File "/path/to/gecko/testing/mochitest/mach_commands.py", line 370, in run_mochitest_general
    driver.install_tests(tests)
  File "/path/to/gecko/python/mozbuild/mozbuild/controller/building.py", line 1374, in install_tests
    '_tests', test_objs)
  File "/path/to/gecko/python/mozbuild/mozbuild/testing.py", line 242, in install_test_files
    out_dir)
  File "/path/to/gecko/python/mozbuild/mozbuild/testing.py", line 130, in convert_support_files
    " please omit the duplicate entry." % (pattern, field))
(In reply to Rob Wu [:robwu] from comment #0)
> I can't run a specific browser test any more, let alone a whole directory.
> This is because bug 1494023 adds head.js to support-files of browser.ini,
> while browser-common.ini itself also includes head.js
> I locally reverted the patch from bug 1494023 and the bug went away.
> And even without the patch, I was not able to reproduce the issue from bug
> 1494023 (using an artifact build on Linux).

All of this is hilarious, but in the not-funny way. Without the patch, how is head.js being included by the 3 tests directly in browser.ini ? There's nothing that says it should be there... Can you not reproduce the bug even after a clobber? What about a non-artifact build?
I just retested and if I back out the fix from bug 1494023 locally, and run this on my mbp:

buildwith frontend # this selects my artifact build manifest
./mach build && ./mach mochitest browser/components/extensions/test/browser/browser_ext_autocompletepopup.js

it breaks the same way as before:

 0:03.64 INFO checking window state
 0:03.70 TEST_START: browser/components/extensions/test/browser/browser_ext_autocompletepopup.js
 0:03.70 INFO Entering test bound testAutocompletePopup
 0:03.71 INFO Extension loaded
 0:04.18 FAIL Uncaught exception - at chrome://mochitests/content/browser/browser/components/extensions/test/browser/browser_ext_autocompletepopup.js:67 - ReferenceError: clickPageAction is not defined
Stack trace:
testAutocompletePopup@chrome://mochitests/content/browser/browser/components/extensions/test/browser/browser_ext_autocompletepopup.js:67:3
Async*Tester_execTest/<@chrome://mochikit/content/browser-test.js:1102:34
async*Tester_execTest@chrome://mochikit/content/browser-test.js:1093:16
nextTest/<@chrome://mochikit/content/browser-test.js:995:9
SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:795:59
 0:04.18 INFO Leaving test bound testAutocompletePopup
 0:04.18 FAIL Extension left running at test shutdown - 
Stack trace:
chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:109
chrome://mochikit/content/browser-test.js:nextTest:704
chrome://mochikit/content/browser-test.js:testScope/test_finish/<:1396
chrome://mochikit/content/browser-test.js:run:1333
 0:04.33 GECKO(11705) MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
 0:04.33 GECKO(11705) MEMORY STAT | vsize 6160MB | residentFast 342MB | heapAllocated 163MB
 0:04.33 TEST_END: Test OK. Subtests passed 0/2. Unexpected 2
 0:04.33 FAIL Found an unexpected tab at the end of test run: http://example.com/ -
I reproduced Gijs' test failure after a clobber.

The above patch fixes the original and new issue.
Assignee: nobody → rob
Status: NEW → ASSIGNED
Comment on attachment 9012174 [details]
Bug 1494304 - Avoid duplicate head.js in browser extension tests

Andrew Swan [:aswan] has approved the revision.
Attachment #9012174 - Flags: review+
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/85c961f8eea0
Avoid duplicate head.js in browser extension tests r=aswan
https://hg.mozilla.org/mozilla-central/rev/85c961f8eea0
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.