Add more failure unit tests to test_configure.py

RESOLVED FIXED in Firefox 48

Status

()

Core
Build Config
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

unspecified
mozilla48
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

MozReview Requests

()

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

Attachments

(4 attachments)

(Assignee)

Description

2 years ago
test_configure.py mostly tests working conditions. It should also test many kinds of failures. (and the --with-advanced=break test should consequently move to a separate test file)
(Assignee)

Updated

2 years ago
Blocks: 1256571
(Assignee)

Updated

2 years ago
Assignee: nobody → mh+mozilla
(Assignee)

Comment 1

2 years ago
Created attachment 8740336 [details]
MozReview Request: Bug 1254374 - Remove the old TestConfigure.test_imports test. r?nalexander

It now duplicates the test added in bug 1256573, which is actually better.

Review commit: https://reviewboard.mozilla.org/r/45721/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45721/
Attachment #8740336 - Flags: review?(nalexander)
Attachment #8740337 - Flags: review?(nalexander)
Attachment #8740338 - Flags: review?(nalexander)
Attachment #8740339 - Flags: review?(nalexander)
(Assignee)

Comment 2

2 years ago
Created attachment 8740337 [details]
MozReview Request: Bug 1254374 - Remove TestConfigure.get_result. r?nalexander

Review commit: https://reviewboard.mozilla.org/r/45723/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45723/
(Assignee)

Comment 3

2 years ago
Created attachment 8740338 [details]
MozReview Request: Bug 1254374 - Add exception message checks to test_options.py. r?nalexander

Review commit: https://reviewboard.mozilla.org/r/45725/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45725/
(Assignee)

Comment 4

2 years ago
Created attachment 8740339 [details]
MozReview Request: Bug 1254374 - Add various failure tests to test_configure.py. r?nalexander

At the same time, improve some of the failures handling paths.

Review commit: https://reviewboard.mozilla.org/r/45727/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45727/
Comment on attachment 8740336 [details]
MozReview Request: Bug 1254374 - Remove the old TestConfigure.test_imports test. r?nalexander

https://reviewboard.mozilla.org/r/45721/#review42369
Attachment #8740336 - Flags: review?(nalexander) → review+
Attachment #8740337 - Flags: review?(nalexander) → review+
Comment on attachment 8740337 [details]
MozReview Request: Bug 1254374 - Remove TestConfigure.get_result. r?nalexander

https://reviewboard.mozilla.org/r/45723/#review42373
Comment on attachment 8740338 [details]
MozReview Request: Bug 1254374 - Add exception message checks to test_options.py. r?nalexander

https://reviewboard.mozilla.org/r/45725/#review42377

Not a huge fan of repeating plural logic in test assertions, but whatever.  Forward!
Attachment #8740338 - Flags: review?(nalexander) → review+
Comment on attachment 8740339 [details]
MozReview Request: Bug 1254374 - Add various failure tests to test_configure.py. r?nalexander

https://reviewboard.mozilla.org/r/45727/#review42379

Can you give me an example when the representation of type `T` and `T.__name__` differ?

::: python/mozbuild/mozbuild/test/configure/test_configure.py:50
(Diff revision 1)
>          return config
>  
> +    def moz_configure(self, source):
> +        return MockedOpen({
> +            os.path.join(test_data_path,
> +                         'moz.configure'): textwrap.dedent(source)

Nifty.
Attachment #8740339 - Flags: review?(nalexander) → review+
(Assignee)

Comment 9

2 years ago
(In reply to Nick Alexander :nalexander from comment #8)
> Comment on attachment 8740339 [details]
> MozReview Request: Bug 1254374 - Add various failure tests to
> test_configure.py. r?nalexander
> 
> https://reviewboard.mozilla.org/r/45727/#review42379
> 
> Can you give me an example when the representation of type `T` and
> `T.__name__` differ?

>>> print type(42)
<type 'int'>
>>> print type(42).__name__
int

Comment 10

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/907ac5daf5b0
https://hg.mozilla.org/integration/mozilla-inbound/rev/1f39e69e4336
https://hg.mozilla.org/integration/mozilla-inbound/rev/571153e117bc
https://hg.mozilla.org/integration/mozilla-inbound/rev/7edca44ff30c

Comment 11

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/907ac5daf5b0
https://hg.mozilla.org/mozilla-central/rev/1f39e69e4336
https://hg.mozilla.org/mozilla-central/rev/571153e117bc
https://hg.mozilla.org/mozilla-central/rev/7edca44ff30c
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.