8238953: tools/jpackage tests do not work on Ubuntu Linux
Baesken, Matthias
matthias.baesken at sap.com
Fri Feb 14 14:51:54 UTC 2020
Btw one small comment, I wonder why you have own functions for finding out the platform (e.g. in TKit) , maybe jdk.test.lib.Platform should be reused like in a lot of other jtreg tests ?
Example :
28import jdk.test.lib.Platform;
43public class DynLibsTest {
44
45 public void run(CommandExecutor executor) {
46 OutputAnalyzer output = executor.execute("VM.dynlibs");
47
48 String osDependentBaseString = null;
49 if (Platform.isAix()) {
50 osDependentBaseString = "lib%s.so";
51 } else if (Platform.isLinux()) {
52 osDependentBaseString = "lib%s.so";
53 } else if (Platform.isOSX()) {
(and isUbunutu() could be added there too , for potential later reuse ) .
Best regards, Matthias
>
> 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