On 11/2/12 1:08 AM, Ms2ger wrote:
On 11/02/2012 01:47 AM, Dave Mandelin wrote:
First, I want to try to pour some gasoline on the dying embers and
suggest that perhaps we should totally rearrange everything. As a
developer user of our testing systems, I always found it incredibly
irritating that there were test directories sprinkled throughout the
tree that got copied to the build dirs as part of the build process,
with no clear mapping between the build path of the test, the source
path of the test, and the path you had to pass to mochitests to
actually run the test.
This, at least, is easily solved: even today, you can run ./mach
mochitest-plain foo/bar/test_baz.html and never again care about what
happens in the build dir. (Yes, mach doesn't yet accept all options the
python harness itself supports; patches welcome.)
What Ms2ger said ;)
One of my primary goals of mach is to make common developer tasks (like
running tests) as brain dead simple as possible. It's not quite there
yet (patches welcome). From a friendliness perspective, the upside of
running things through mach is much, much higher than having random make
targets relying on arcane environment variables, etc. As an experiment,
identify the pieces of information required to run a test through make
targets. Now, compare that to running a test through mach. Mach requires
a lot less contextual knowledge and makes it much easier for new Project
contributors.
I also have a corollary goal of marginalizing the importance of working
inside the object directory. Currently, we find ourselves doing a lot of
work inside the object directory because, well, we need to. I tend to
view the object directory as a "cache" of the output of the build
process. And, caches are not something you typically have visibility
into. I'd rather have tools that run from the source directory and reach
into the object directory for me. This eases the burden on developers
because it doesn't require us to have intimate knowledge about the
object directory. It also fosters inevitable refactorings because
treating the object directory as a black box means you can change the
contents inside at will as long as you don't break the interfaces into
it (like mach). As they say, all problems can be solved with a level of
indirection ;) Now, a black box object directory is a utopian future.
Will we ever truly get there? Probably not. But, I'll continue to work
on tools like mach and encourage people to work purely in the source
directory because it's (typically) easier and makes my life as a build
peer trying to push through major build system refactorings much, much
easier.
Going back to tests, once we have rewritten the core of the build system
to define things through "mozbuild" files instead of Makefile.in (bug
784841), we'll have a much saner way of discovering test files and
defining metadata associated with them. This opens a whole lot of
options for test running, including the ability to specify the path to a
test file and have it "just run."
Perhaps I should schedule a brown bag to give a better overview of all
the goals and tasks underway...
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform