Closed Bug 766113 Opened 12 years ago Closed 12 years ago

Command line options -t and -m should exclude each other

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

Right now you are able to specify both the -t (--test) and -m (--manifest) together at the command line. That results in totally unexpected behavior and has to be avoided. If you want to specify tests use -t or -m but not both.

Mozmill should make sure that both options can't be specified.
Attached file Patch
Pointer to Github pull-request
Comment on attachment 634437 [details]
Patch

Right now without a test but before I write test I want to know what you think about the patch.
Attachment #634437 - Attachment description: Pointer to Github pull request: https://github.com/mozautomation/mozmill/pull/50 → Patch
Attachment #634437 - Flags: review?(jhammel)
Jeff, I have updated the patch and added a test for. It's not the safest right now but once I have moved all the tests and manifest related code into MozMill base, we can handle that inside the run_tests method.
So I figured that this behavior is on purpose?

https://github.com/mozautomation/mozmill/blob/master/mozmill/mozmill/__init__.py#L529

Do we really want that? Where will this test be added? Always at the end? I still think we should drop that. But if you agree here, I would have to update my patch once more and get this code removed.
(In reply to Henrik Skupin (:whimboo) from comment #4)
> So I figured that this behavior is on purpose?
> 
> https://github.com/mozautomation/mozmill/blob/master/mozmill/mozmill/
> __init__.py#L529
> 
> Do we really want that? Where will this test be added? Always at the end? I
> still think we should drop that. But if you agree here, I would have to
> update my patch once more and get this code removed.

It is on purpose.  And yes, it gets added to the end.
So why do we want to have this behavior? What does it buy us beside confusion what gets run and when?
Comment on attachment 634437 [details]
Patch

Nice and simple, I like it
Attachment #634437 - Flags: review?(jhammel) → review+
https://github.com/mozautomation/mozmill/commit/dd78957442edd1402182a19818e4254069ca85d3
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: