On 2018-10-28, Gintautas Grigelionis wrote:

> On Sun, 28 Oct 2018 at 21:02, Stefan Bodewig <bode...@apache.org> wrote:

>> On 2018-10-28, Gintautas Grigelionis wrote:
>>> On Sun, 28 Oct 2018 at 20:23, Stefan Bodewig <bode...@apache.org> wrote:

>>>> I guess I need to create a branch to either convince you it is possible
>>>> or convince me that it is not :-)

>>> No branch is necessary, just  activate launcher tests; the effect will be
>>> the same.

>> I'm afraid I can't follow you.

>> What breaks in the remove-tests-constants-from-main-tree?

>>> It is not a matter of test harness, either. It is a matter of
>>> documentation and proper dependency management.

>>> I'm only using a different tool to highlight the importance of the
>>> latter (as far as running tests is concerned, anyway :-)

>> And because of above I probably don't understand what you mean here
>> either.

> What I meant is the following: anyone who wishes to see the effect of
> test dependencies can replace the bogus directory "testcases" with the
> correct directory "tests/junit" in src/etc/poms/ant-launcher/pom.xml
> (line 77, the definition of testSourceDirectory property).

Which fails because the tests need the Os class - which is completely
unrelated to the question where constants only used for tests are to be
defined.

> Then run "mvn -f src/etc/poms/pom.xml clean package" (what Jenkins
> does).

The tests for core fail for me (CommandlineJava) anyway. I think I've
already said that running Ant's unit tests in Maven is a non-goal for me
:-)

> If test constants are removed from main, then Ant core must build yet
> another jar containing test constants which would be a compile
> dependency for the code in ant-testutil,

No, just compile the constants as part of ant-testutil. That's what my
branch does.

> because Ant core in itself will not suffice. It is possible to cook
> such a jar file using a Maven qualifier, and it will pollute every
> build in the world which chooses to use Ant core.

No such extra dependency is actually needed.

> As the saying over here goes, "plague or cholera".

Possibly. Our tests have never been designed to be run by a tool that
allows test time deoendencies to influence the dependencies of non-test
code.

Please really take a look at my branch and explain why it cannot be done
that way. I don't see any reason to keep test-only constants inside the
main code base.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to