logo separator

[mkgmap-dev] remainder of logging changes

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Apr 13 16:19:26 BST 2021

Hi Steve,

please have a look. Seems the build hangs again or the patch doesn't work on unix. It works well on my machine.

Gerd

________________________________________
Von: Steve Ratcliffe <steve at parabola.me.uk>
Gesendet: Dienstag, 13. April 2021 12:23
An: Gerd Petermann; Development list for mkgmap; Steve Ratcliffe
Betreff: Re: AW: [mkgmap-dev] remainder of logging changes


Hi Gerd

 > please comment what you think about the trick with
 > TestUtils.runAsProcess(). I think it might not work on the build
 > server since ant clean test doesn't build \dist\mkgmap.jar.
 > Of course we can add target dist as a depency in build.xml to fix that, but I think
 > you had reasons to avoid that?

It doesn't work in Linux for the reasons you mentioned.  You can
probably just use "java" and it will work for both? (I can't test
on Windows at the moment).  The backslash doesn't work on Linux,
but I believe that forward slash will work on both.  If not, then you
can use File.separator.

I probably didn't build dist just because there was no need to, its
no big deal to add it, but you can avoid doing so by using
-classpath instead of -jar if you wish.

The following that works on Linux and I believe it would work on windows
too:

        List<String> args = new ArrayList<>(Arrays.asList(
                "java",
                "-classpath",
                "build/classes" + File.pathSeparator + "lib/compile/*",
                "uk.me.parabola.mkgmap.main.Main",
                Args.TEST_STYLE_ARG
        ));
        args.addAll(Arrays.asList(in));

 > Do you think this is the right way to go? Doesn't it somehow bypass
 > the junit stuff?  Would it help to move to JUnit 5?

I do not see anything wrong with doing it that way as long as it works
in all environments.

Steve


More information about the mkgmap-dev mailing list