Re: JavaHL jar file containing class files for unit tests

Branko Čibej <[email protected]> Sun, 26 Jul 2026 11:39:39 +0200
Newsgroups gmane.comp.version-control.subversion.devel
Organization The Apache Software Foundation
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------Q0Mq20awsc1jVqDabwOsB0g5
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 26. 7. 2026 11:24, Jun Omae wrote:
> Hi,
>
> I noticed that svn-javahl.jar file has class files for unit tests while working for support build JavaHL with cmake.
> I don't think it's necessary for the jar file for distribution.... is that intentional?


I noticed this myself the last time I looked at JavaHL. I'm not sure how 
this came about in the first place, but by now it's intentional because 
it's always been this way. Maybe it's to allow users who only use 
binaries to run JavaHL tests. In any case this is part of the published ABI.


> In JavaHL build with cmake, the class files for unit tests are archived into svn-javahl-tests.jar, and only svn-javahl.jar is installed.


The CMake build must create a JAR that is identical to what the 
autotools produce.


>
> E.g.
>
> $ cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=26.04
> DISTRIB_CODENAME=resolute
> DISTRIB_DESCRIPTION="Ubuntu Resolute Raccoon (development branch)"
>
> $ apt install -y libsvn-java
>
> $ unzip -l /usr/share/java/svn-javahl.jar | grep RunTests
>       2013  2026-03-20 11:04   org/apache/subversion/javahl/RunTests$SVNTestSuite.class
>       1155  2026-03-20 11:04   org/apache/subversion/javahl/RunTests.class
>       1846  2026-03-20 11:04   org/tigris/subversion/javahl/RunTests$SVNTestSuite.class
>       1179  2026-03-20 11:04   org/tigris/subversion/javahl/RunTests.class
>
> $ unzip -l /usr/share/java/svn-javahl.jar | grep Test | wc -l
> 101
>

--------------Q0Mq20awsc1jVqDabwOsB0g5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 26. 7. 2026 11:24, Jun Omae wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <pre wrap="" class="moz-quote-pre">Hi,

I noticed that svn-javahl.jar file has class files for unit tests while working for support build JavaHL with cmake.
I don't think it's necessary for the jar file for distribution.... is that intentional?</pre>
    </blockquote>
    <br>
    <br>
    I noticed this myself the last time I looked at JavaHL. I'm not sure
    how this came about in the first place, but by now it's intentional
    because it's always been this way. Maybe it's to allow users who
    only use binaries to run JavaHL tests. In any case this is part of
    the published ABI.<br>
    <br>
    <br>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <pre wrap="" class="moz-quote-pre">In JavaHL build with cmake, the class files for unit tests are archived into svn-javahl-tests.jar, and only svn-javahl.jar is installed.</pre>
    </blockquote>
    <br>
    <br>
    The CMake build must create a JAR that is identical to what the
    autotools produce.<br>
    <br>
    <br>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <pre wrap="" class="moz-quote-pre">

E.g.

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=26.04
DISTRIB_CODENAME=resolute
DISTRIB_DESCRIPTION="Ubuntu Resolute Raccoon (development branch)"

$ apt install -y libsvn-java

$ unzip -l /usr/share/java/svn-javahl.jar | grep RunTests
     2013  2026-03-20 11:04   org/apache/subversion/javahl/RunTests$SVNTestSuite.class
     1155  2026-03-20 11:04   org/apache/subversion/javahl/RunTests.class
     1846  2026-03-20 11:04   org/tigris/subversion/javahl/RunTests$SVNTestSuite.class
     1179  2026-03-20 11:04   org/tigris/subversion/javahl/RunTests.class

$ unzip -l /usr/share/java/svn-javahl.jar | grep Test | wc -l
101

</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------Q0Mq20awsc1jVqDabwOsB0g5--