On 4/11/2013 1:57 AM, Neil wrote:
> Gregory Szorc wrote:
>
>> We should eventually be able to get to a state where there are no
>> moz.build/Makefile.in files in test directories. Well, at least for
>> test suites using manifests to define test files (xpcshell,
>> mochitest, reftest, possibly others).
>>
> Do these manifests include associated files (e.g. iframes, images?)

Presumably, yes.

>
>> Now, the real question is whether we still generate Makefile for
>> these directories. If everyone used mach commands for running tests,
>> we wouldn't need Makefile or their targets to invoke per-directory
>> tests.
>>
> Don't mochitests use TEST_PATH from the root Makefile? I can't
> remember which tests need a per-directory Makefile but it might
> include xpcshell tests.
>

My memory is foggy since I've been using mach exclusively for months.
But, I know xpcshell tests have you invoking a leaf Makefile. e.g. |make
-C services/sync/tests xpcshell-tests| or |SOLO_FILE=test_foo.js make -C
services/sync/tests|. What makes it confusing is the xpcshell test
directory doesn't usually contain a Makefile, so you have to know where
XPCSHELL_TESTS is defined. Since mach talks directly to the xpcshell
test harness, you just need to give it a path to a test file or
directory and it "just works." Not to mention you can just type |mach
help xpcshell-test| to see how you can influence test execution. Try
doing that with make!

Once the build system is aware of the type of every test, my plan is to
expose a |mach test <path>| that automagically invokes the appropriate
test runner(s). We could even go a step further and do |mach do <path>|.
If the path is a .cpp, it gets compiled. If it's a test, it gets
executed. There's a lot of magic you can do once annotations are in
moz.build files...
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to