Closed Bug 1414399 Opened 7 years ago Closed 7 years ago

Refactor test resolving logic out of |mach test|

Categories

(Testing :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: ahal, Assigned: ahal)

References

Details

Attachments

(2 files)

I'd like to use the same logic that |mach test| uses to find tests in a new |mach try| subcommand. This logic currently live in testing/mach_commands.py, which isn't conducive to sharing. I propose we create a new moztest.resolve module for this instead.

This might also be a good opportunity to move the mozbuild.testing.TestResolver class out of mozbuild.
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Attachment #8926006 - Flags: review?(core-build-config-reviews)
Attachment #8926007 - Flags: review?(core-build-config-reviews)
Comment on attachment 8926006 [details]
Bug 1414399 - [mozbuild/moztest] Move mozbuild.testing.TestResolver to moztest.resolve

https://reviewboard.mozilla.org/r/197224/#review202494

Yeah, this is only peripherally in the build system. I'm fine with it moving out of mozbuild.
Attachment #8926006 - Flags: review+
Comment on attachment 8926007 [details]
Bug 1414399 - [moztest] Refactor |mach test|'s resolving logic into moztest.resolve

https://reviewboard.mozilla.org/r/197226/#review202496

Seems like a reasonable refactor.
Attachment #8926007 - Flags: review+
Attachment #8926006 - Flags: review?(core-build-config-reviews)
Attachment #8926007 - Flags: review?(core-build-config-reviews)
Comment on attachment 8926006 [details]
Bug 1414399 - [mozbuild/moztest] Move mozbuild.testing.TestResolver to moztest.resolve

https://reviewboard.mozilla.org/r/197224/#review202506

::: testing/mach_commands.py:520
(Diff revision 1)
>          self._activate_virtualenv()
>          import mozinfo
>          from manifestparser import TestManifest
>  
>          if test_objects is None:
> -            from mozbuild.testing import TestResolver
> +            from moztest.resolve import TestResolver

I see 3 instances of "import TestResolver" in testing/mach_commands.py, but only 2 changes here. Check that you didn't miss one?
Good catch, thanks Geoff!
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1ede5a47bb98
[mozbuild/moztest] Move mozbuild.testing.TestResolver to moztest.resolve r=gps
https://hg.mozilla.org/integration/autoland/rev/3170c6d82e89
[moztest] Refactor |mach test|'s resolving logic into moztest.resolve r=gps
https://hg.mozilla.org/mozilla-central/rev/1ede5a47bb98
https://hg.mozilla.org/mozilla-central/rev/3170c6d82e89
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: