Closed Bug 818646 Opened 7 years ago Closed 7 years ago

Add mozbuild unit tests to |make check|

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla21

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file, 1 obsolete file)

They aren't hooked up now because they require Python 2.7. I'd love to see test coverage on TBPL. A side effect of this is that both will now be part of the build and subject to normal landing procedures (I've been skipping inbound for a lot of patches).

We may consider only enabling mozbuild tests if we want mach to still live in its own world. Although, I'd love for mach to have automated test coverage.

This will likely involve some work to make the tests all pass ;)
Whiteboard: [mach]
Depends on: 818777
Pretty straightforward.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Attachment #694615 - Flags: review?(ted)
mach isn't part of the build... yet.
Summary: Add mach and mozbuild unit tests to |make check| → Add mozbuild unit tests to |make check|
We need to add mach to the virtualenv because we use the process and logging mixins in mozbuild. At some point we might want to move these mixins outside of mach. meh.

https://tbpl.mozilla.org/?tree=Try&rev=16d6afae568a
Attachment #694615 - Attachment is obsolete: true
Attachment #694615 - Flags: review?(ted)
Attachment #694684 - Flags: review?(ted)
Comment on attachment 694684 [details] [diff] [review]
Add mozbuild unit tests to |make check|, v2

Review of attachment 694684 [details] [diff] [review]:
-----------------------------------------------------------------

::: python/Makefile.in
@@ +13,5 @@
> +  mozbuild/mozbuild/test \
> +  mozbuild/mozbuild/test/compilation \
> +  $(NULL)
> +
> +PYTHON_UNIT_TESTS := $(foreach dir,$(test_dirs),$(wildcard $(srcdir)/$(dir)/*.py))

I thought you hated wildcard? :)
Attachment #694684 - Flags: review?(ted) → review+
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #4)
> > +PYTHON_UNIT_TESTS := $(foreach dir,$(test_dirs),$(wildcard $(srcdir)/$(dir)/*.py))
> 
> I thought you hated wildcard? :)

This will all die with moz.build files soon enough :)

We should just define directories here and let the test scanner recurse into children directories. We'll get there.
https://hg.mozilla.org/projects/build-system/rev/d4f37aa65d09

I also changed the MSVC path test slightly so things passed on Windows. (I was using normpath() in the wrong place in the most recent patch.)
Whiteboard: [mach] → [fixed-in-build-system]
https://hg.mozilla.org/mozilla-central/rev/d4f37aa65d09
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-build-system]
Target Milestone: --- → mozilla21
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.