Closed Bug 818646 Opened 7 years ago Closed 7 years ago

Add mozbuild unit tests to |make check|


(Firefox Build System :: General, defect)

Not set


(Not tracked)



(Reporter: gps, Assigned: gps)




(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
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.
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/
@@ +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 files soon enough :)

We should just define directories here and let the test scanner recurse into children directories. We'll get there.

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]
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.