RFR: 8238953: tools/jpackage tests do not work on Ubuntu Linux

Baesken, Matthias matthias.baesken at sap.com
Fri Feb 14 14:45:40 UTC 2020


Hi Alexey  , I like your idea to do the handling in  test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageType.java  .

New webrev :

http://cr.openjdk.java.net/~mbaesken/webrevs/8238953.1/



Best regards, Matthias


> Date: Thu, 13 Feb 2020 08:06:44 -0800
> From: Alexey Semenyuk <alexey.semenyuk at oracle.com>
> To: core-libs-dev at openjdk.java.net
> Subject: Re: RFR: 8238953: tools/jpackage tests do not work on Ubuntu
> 	Linux
> Message-ID: <0400cf9e-df43-b217-26b0-f9bb0fd1a9b0 at oracle.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> Hi Matthias,
> 
> We don't set "jpackage.test.disabledPackagers" property from the test
> code. It is assumed to be set from jtreg command line that runs tests.
> The value of the property is just checked in tests.
> So basically there is no need to change code at all.
> However, if you want to disable running rpm tests on Ubuntu, you can
> tweak setting of
> jdk.jpackage.test.PackageType.Inner.DISABLED_PACKAGERS
> property
> (test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageType.java).
> Something like this:
> 
> class Inner {
>  ??? private static boolean isUbuntu() {
>  ??????? if (!TKit.isLinux()) {
>  ??????????? return false;
>  ??????? }
>  ??????? ...
>  ??? }
> 
>  ??? private final static Set<String> DISABLED_PACKAGERS;
> 
>  ??? static {
>  ??????? Set<String> disabledPackagers =
> TKit.tokenizeConfigProperty("disabledPackagers");
>  ??????? if (disabledPackagers != null) {
>  ??????????? DISABLED_PACKAGERS = disabledPackagers;
>  ??????? } else if (isUbuntu()) {
>  ??????????? DISABLED_PACKAGERS = Set.of("rpm");
>  ??????? } else {
>  ??????????? DISABLED_PACKAGERS = Collections.emptySet();
>  ??????? }
>  ??? }
> }
> 
> This way the fix would disable running rpm tests on Ubuntu if
> "jpackage.test.disabledPackagers" property is not set allowing to still
> run rpm tests on Ubuntu in case the property is explicitly set to some
> value.
> 
> - Alexey
> 



More information about the core-libs-dev mailing list