< prev index next >
test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageType.java
Print this page
rev 58025 : 8238953: tools/jpackage tests do not work on Ubuntu Linux
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -116,10 +116,27 @@
Stream.concat(LINUX.stream(), WINDOWS.stream()),
MAC.stream()).collect(Collectors.toUnmodifiableSet());
private final static class Inner {
- private final static Set<String> DISABLED_PACKAGERS = Optional.ofNullable(
- TKit.tokenizeConfigProperty("disabledPackagers")).orElse(
- Collections.emptySet());
+ private static boolean isUbuntu() {
+ if (!TKit.isLinux()) {
+ return false;
+ }
+ return TKit.isUbuntu();
+ }
+
+ 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();
+ }
+ }
}
}
< prev index next >