Re: Tests in Surefire
On Wed, 24 Oct 2018 at 00:29, Gintautas Grigelionis <g.grigelionis@xxxxxxxxx>
> On Tue, 23 Oct 2018 at 12:25, Stefan Bodewig <bodewig@xxxxxxxxxx> wrote:
>> On 2018-10-20, Gintautas Grigelionis wrote:
>> > I believe that in order to execute Ant test suite in Surefire one must
>> > configure basedir which unfortunately affects Ant test projects.
>> I'm not sure I share the goal of trying to run the tests via Surefire at
>> Antoine has been the one who set up the maven poms and I don't remember
>> us ever discussing what we wanted to achieve there. To me they've been a
>> vehicle to get decent POMs for the jars we publish to Maven Central, not
>> more. Here "decent" means "specifies the correct dependencies" and not
>> even "can be used to compile the jar". I think it has outgrown my
>> personal minimal requirement by far, so others must have had bigger
>> plans :-)
>> I do not believe we've been aware of Surefire bugs that prevented
>> running. We've most likely never cared (and I still don't, obviously :-)
> It was in the README :-) the inability to set basedir/workingDir.
>> > Perhaps it would make sense to have a magic property that (in
>> > combination with detection of Surefire environment) would allow
>> > BuildFileRule to call System.clearProperty("basedir")?
>> If that's all it would take to make them work, that's fine with me. If
>> we need further modifications to the tests them I'm not sure.
> Fair enough. I've hit some snags and I commented on them in the POMs.
I am at the point now where I must say "this is the farthest I could get
without changing the tests".
Please see the comments in src/etc/poms/ant/pom.xml, especially
Some tests, in particular in IncludeTest, are not robust (failure modes
depend on XML parser,
which may throw an exception because encoding is not specified, which was
not the original intention).
AntTest hardcodes directory structure (build/testcases) which apparently
breaks modular builds in Jenkins
(works locally). Also, current test failures in Jenkins apparently are an
oddity of Maven,
which uses ANT_HOME/jre/java on Java 8 or older SDKs precluding use of