Closed Bug 1596426 Opened 8 months ago Closed 7 months ago

KeyError: u'manifest_relpath'

Categories

(Testing :: General, defect, P3)

defect

Tracking

(firefox72 fixed)

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: sg, Assigned: ahal)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When trying to run

./mach test dom/indexedDB/test/unit/*

I get the following error:

KeyError: u'manifest_relpath'

  File "/home/simon/work/mozilla-unified/testing/mach_commands.py", line 327, in test
    run_suites, run_tests = resolver.resolve_metadata(what)
  File "/home/simon/work/mozilla-unified/testing/mozbase/moztest/moztest/resolve.py", line 757, in resolve_metadata
    tests = list(self.resolve_tests(paths=[relpath]))
  File "/home/simon/work/mozilla-unified/testing/mozbase/moztest/moztest/resolve.py", line 705, in resolve_tests
    for test in self._resolve(**kwargs):
  File "/home/simon/work/mozilla-unified/testing/mozbase/moztest/moztest/resolve.py", line 548, in _resolve
    candidate_paths |= {t['file_relpath'] for t in self.tests
  File "/home/simon/work/mozilla-unified/testing/mozbase/moztest/moztest/resolve.py", line 549, in <setcomp>
    if mozpath.normpath(t[key]) == path}

The following variants work though:

./mach test dom/indexedDB/test/unit/
./mach test dom/indexedDB/test/unit/*.js

Maybe it is a misuse, but a more graceful handling would be great nonetheless.

Product: Firefox Build System → Testing
Priority: -- → P3

Ah, I see why this is happening. It's because the shell is expanding to all files which includes a manifest file. This triggers this code:
https://searchfox.org/mozilla-central/source/testing/mozbase/moztest/moztest/resolve.py#546

Which fails because reftest tests don't have this key (it is populated by manifestparser). Resolving manifests was a new feature that is evidently not working.

Assignee: nobody → ahal
Status: NEW → ASSIGNED

I would prefer if this (and the other keys there) were added by the
ReftestManifest object instead:
https://searchfox.org/mozilla-central/rev/652014ca1183c56bc5f04daf01af180d4e50a91c/layout/tools/reftest/reftest/__init__.py#39

But since there is already precedent here, it's easiest to tag
'manifest_relpath' along with the others. Bug 1590388 will likely handle
cleaning all this up.

Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b9bfd134a782
[mozbuild] Add a 'manifest_relpath' key to all tests in the TestManifestBackend, r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.