[tryselect] Stand up some tests for |mach try|

RESOLVED FIXED in Firefox 57

Status

Testing
General
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: ahal, Assigned: ahal)

Tracking

unspecified
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(5 attachments)

(Assignee)

Description

9 months ago
There isn't any way to test changes to |mach try| at the moment. I think something like this would be best tested with the 'cram' test framework (aka mercurial .t tests).
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
(Assignee)

Updated

9 months ago
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED

Comment 5

9 months ago
mozreview-review
Comment on attachment 8899602 [details]
Bug 1391675 - [tryselect] Make main command and all subcommands use the same argument parser,

https://reviewboard.mozilla.org/r/170906/#review176260

Nice to see things more properly structured. Good job Andrew.
Attachment #8899602 - Flags: review?(armenzg) → review+

Comment 6

9 months ago
mozreview-review
Comment on attachment 8899603 [details]
Bug 1391675 - [tryselect] Move --no-push into common arguments,

https://reviewboard.mozilla.org/r/170908/#review176264
Attachment #8899603 - Flags: review?(armenzg) → review+

Comment 7

9 months ago
mozreview-review
Comment on attachment 8899601 [details]
Bug 1391675 - [mach] Allow commands to have both a parser and subcommands,

https://reviewboard.mozilla.org/r/170904/#review176842

Yes, mach shouldn't get in the way here.

I'm wondering if we should verify the parser doesn't have positional arguments though - as I would expect those to interfere with sub-command handling. But if someone shoots themselves in the foot, then they shoot themselves in the foot :)
Attachment #8899601 - Flags: review?(gps) → review+

Comment 8

9 months ago
mozreview-review
Comment on attachment 8899604 [details]
Bug 1391675 - [tryselect] Add a test for 'mach try fuzzy' and associated task,

https://reviewboard.mozilla.org/r/170910/#review176854

Very nice!

::: taskcluster/docker/lint/system-setup.sh:63
(Diff revision 1)
> +
> +tooltool_fetch <<EOF
> +[
> +  {
> +    "size": 866160,
> +    "visibility": "public",

This line isn't needed for fetching.

::: tools/tryselect/test/test_fuzzy.t:10
(Diff revision 1)
> +
> +  $ ./mach try fuzzy --no-push -q "'foo"
> +  Calculated try selector:
> +  {
> +    "tasks": [
> +      "test/foo-debug", 

Pro tip: If you pass ``separators=(',', ':')`` to ``json.dump`` or ``json.dumps`` this trailing whitespace goes away. I find myself doing a lot of that in version-control-tools to make test output more sane.
Attachment #8899604 - Flags: review?(gps) → review+
(Assignee)

Comment 9

9 months ago
mozreview-review-reply
Comment on attachment 8899601 [details]
Bug 1391675 - [mach] Allow commands to have both a parser and subcommands,

https://reviewboard.mozilla.org/r/170904/#review176842

Surprisingly that case also seems to work as expected. If the positional arg matches a subcommand, it dispatches and if not, it is passed through like normal.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 15

9 months ago
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a6bb409c7fc4
[mach] Allow commands to have both a parser and subcommands, r=gps
https://hg.mozilla.org/integration/autoland/rev/6f29f12cd26d
[tryselect] Make main command and all subcommands use the same argument parser, r=armenzg
https://hg.mozilla.org/integration/autoland/rev/a2a371e7e6f8
[tryselect] Move --no-push into common arguments, r=armenzg
https://hg.mozilla.org/integration/autoland/rev/c4fc5865ac38
[tryselect] Add a test for 'mach try fuzzy' and associated task, r=gps
Comment hidden (mozreview-request)
(Assignee)

Updated

9 months ago
Attachment #8900416 - Flags: review?(gps)

Comment 17

9 months ago
mozreview-review
Comment on attachment 8900416 [details]
Bug 1391675 - Fix sm-pkg bustage on a CLOSED TREE,

https://reviewboard.mozilla.org/r/171762/#review176984
Attachment #8900416 - Flags: review?(gps) → review+

Comment 18

9 months ago
Pushed by kwierso@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f6306658731b
Fix sm-pkg bustage on a CLOSED TREE, r=bustage CLOSED TREE
You need to log in before you can comment on or make changes to this bug.