Re: ant git commit: Add magic names for tests, run more tests in Surefire
On Sun, 28 Oct 2018 at 20:23, Stefan Bodewig <bodewig@xxxxxxxxxx> wrote:
> On 2018-10-28, Gintautas Grigelionis wrote:
> > On Sun, 28 Oct 2018 at 18:48, Stefan Bodewig <bodewig@xxxxxxxxxx> wrote:
> >> On 2018-10-28, Gintautas Grigelionis wrote:
> >>> On Sun, 28 Oct 2018 at 18:17, Stefan Bodewig <bodewig@xxxxxxxxxx>
> >>>> On 2018-10-28, Gintautas Grigelionis wrote:
> >>>>> On Sun, 28 Oct 2018 at 17:59, Stefan Bodewig <bodewig@xxxxxxxxxx>
> >> wrote:
> >>>>>> I wonder whether it wouldn't be a good idea to create a separate
> >>>>>> for constants used during testing that lives in ant-testutil rather
> >> than
> >>>>>> poluting the "magic names" of Ant.
> >>>>> The problem is that should such class end up in ant-testutil, it
> >>>> ant
> >>>>> dependent on ant-util and that creates a dependency loop.
> >>>> I'm talking about the "magic names" only used in tests. The four
> >>>> properties with names that start with TEST_ should not be used inside
> >>>> the rest of Ant, are they?
> >>> I understand your point. TEST_ properties are only for tests. But, the
> >>> tests themselves are a part of Ant core.
> >> Are they? I really hope there are no test classes in ant.jar.
> >> The constants can be moved to the tests jar of Ant core (where Ant core
> >> likely means org.apache.ant:ant in Maven speak) and ant-testutil. All
> >> Maven artifacts that are not org.apache.ant:ant can have a test scope
> >> dependency on ant-testutil.
> > The scope does not matter, should the test constants be in ant-util,
> > will be a dependency of ant on ant-testutil creating a loop.
> > Test classes in Ant core won't compile before ant-testutil is compiled
> > packaged, which in turn would require ant to be compiled and packaged.
> 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
> > It's all nice and easy when there is a pile of code that can be compiled
> > once and divided arbitrarily... not so simple when it has to be split
> > beforehand (see my remarks on AssertionsTest depending JUnit tasks or
> > launcher tests depending on Os).
> I'm not happy defining constants only used during testing in the main
> source tree so that a build tool other than Ant can be used to run the
> tests. Right now I believe this won't be necessary at all.
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 :-)