Usefulness of test-compile
tuncer.ayaz at gmail.com
Mon Aug 13 08:06:41 EDT 2012
On Mon, Aug 13, 2012 at 11:58 AM, Tim Watson wrote:
> On 9 Aug 2012, at 23:48, Kelly McLaughlin wrote:
>> Agreed, I like the compile_only flag as an alternative to an actual
>> command. I tried it out today and it seems to do just what I would
>> like. I also like having separate .eunit and .qc directories.
>> On Aug 9, 2012, at 11:27 AM, Tuncer Ayaz wrote:
>>> On Thu, Aug 9, 2012 at 2:36 PM, Joseph Wayne Norton wrote:
>>>> Tuncer -
>>>> Thanks for the update and your consideration.
>>> Thanks for suggesting the command-less alternative :).
>>> Pushed another set of changes to master which restore .eunit and make
>>> qc use a separate dir (.qc). The qc command is experimental, and a
>>> unification of the dirs, especially given that we have to have
>>> separate compile opts, was a premature decision.
>>>> On Aug 9, 2012, at 9:11 PM, Tuncer Ayaz wrote:
>>>>> After much thought and consideration, I have realized what's best
>>>>> and pushed the following changes to master:
>>>>> 1. Replace test-compile with compile_only=true option
>>>>> 2. Separate eunit and qc compile options
>>>>> What's left is whether we should make the shared .test directory
>>>>> permanent or use separate dirs for eunit and qc.
> This seems good, except that now for other testing frameworks (such as
> retest or systest) I have to have a makefile target that does `rebar
> eunit compile_only=true` to compile the sources they require, which is
> pretty ugly as I'm not actually invoking eunit at all - that's really
> opaque, confusing for readers who don't know about this
> conversation/decision and so on. At least 'test-compile' makes it
> *clear* what's being done. So for my part, I don't think this was a
> particularly good thing, although I do agree that the `test-compile`
> command by itself doesn't solve the problem(s) correctly.
I don't think making it a real command is right. It's hard to know whether
it tests compilation or compiles tests. Also, having it shared between
eunit and qc was a problem. It's not a primary command to be used and more
of a lower layer function which got exposed for advanced use. It's much
clearer to run 'eunit compile_only=true' and expect to prepare an eunit
> Could we have the infrastructure used by `compile_only` exported from
> the appropriate module(s) so that other frameworks/plugins can invoke it
> directly please?
See the start of rebar_eunit:eunit/2, but keep in mind that this is
More information about the rebar