From 044dfa81f4a31779ee744eb29275c88126ba2995 Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Fri, 28 Jul 2017 10:49:40 +0200
Subject: [PATCH] java/openjdk8: Adjust remaining parts of the test suite to
 DragonFly.

---
 java/openjdk8/Makefile.DragonFly                   | 101 +++++++++++++++++++++
 .../dragonfly/patch-langtools_test_Makefile        |  14 +++
 2 files changed, 115 insertions(+)
 create mode 100644 java/openjdk8/dragonfly/patch-langtools_test_Makefile

diff --git a/java/openjdk8/Makefile.DragonFly b/java/openjdk8/Makefile.DragonFly
index e4934da04f3..7ede5f4a3ea 100644
--- a/java/openjdk8/Makefile.DragonFly
+++ b/java/openjdk8/Makefile.DragonFly
@@ -1 +1,102 @@
 MAKE_ENV+=     DONT_ENABLE_IPV6="YES"
+
+dfly-patch:
+	${REINPLACE_CMD} -e 's@*BSD @*BSD | DragonFly @g' \
+	${WRKSRC}/hotspot/test/compiler/6894807/Test6894807.sh \
+	${WRKSRC}/hotspot/test/runtime/7110720/Test7110720.sh \
+	${WRKSRC}/hotspot/test/test_env.sh \
+	${WRKSRC}/jdk/test/com/sun/corba/5036554/TestCorbaBug.sh \
+	${WRKSRC}/jdk/test/com/sun/corba/cachedSocket/7056731.sh \
+	${WRKSRC}/jdk/test/com/sun/jdi/ImmutableResourceTest.sh \
+	${WRKSRC}/jdk/test/com/sun/jdi/JITDebug.sh \
+	${WRKSRC}/jdk/test/com/sun/jdi/PrivateTransportTest.sh \
+	${WRKSRC}/jdk/test/com/sun/jdi/ShellScaffold.sh \
+	${WRKSRC}/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh \
+	${WRKSRC}/jdk/test/java/awt/JAWT/JAWT.sh \
+	${WRKSRC}/jdk/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh \
+	${WRKSRC}/jdk/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh \
+	${WRKSRC}/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh \
+	${WRKSRC}/jdk/test/java/io/File/GetXSpace.sh \
+	${WRKSRC}/jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh \
+	${WRKSRC}/jdk/test/java/io/Serializable/serialver/classpath/run.sh \
+	${WRKSRC}/jdk/test/java/io/Serializable/serialver/nested/run.sh \
+	${WRKSRC}/jdk/test/java/lang/ClassLoader/Assert.sh \
+	${WRKSRC}/jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh \
+	${WRKSRC}/jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh \
+	${WRKSRC}/jdk/test/java/lang/StringCoding/CheckEncodings.sh \
+	${WRKSRC}/jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh \
+	${WRKSRC}/jdk/test/java/lang/instrument/MakeJAR2.sh \
+	${WRKSRC}/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh \
+	${WRKSRC}/jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh \
+	${WRKSRC}/jdk/test/java/net/Authenticator/B4933582.sh \
+	${WRKSRC}/jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh \
+	${WRKSRC}/jdk/test/java/net/Socket/OldSocketImpl.sh \
+	${WRKSRC}/jdk/test/java/net/URL/B5086147.sh \
+	${WRKSRC}/jdk/test/java/net/URLClassLoader/B5077773.sh \
+	${WRKSRC}/jdk/test/java/net/URLClassLoader/sealing/checksealed.sh \
+	${WRKSRC}/jdk/test/java/net/URLConnection/6212146/test.sh \
+	${WRKSRC}/jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh \
+	${WRKSRC}/jdk/test/java/nio/charset/spi/basic.sh \
+	${WRKSRC}/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/ext.sh \
+	${WRKSRC}/jdk/test/java/rmi/registry/readTest/readTest.sh \
+	${WRKSRC}/jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh \
+	${WRKSRC}/jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh \
+	${WRKSRC}/jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh \
+	${WRKSRC}/jdk/test/java/security/Security/signedfirst/Dyn.sh \
+	${WRKSRC}/jdk/test/java/security/Security/signedfirst/Static.sh \
+	${WRKSRC}/jdk/test/java/util/Currency/PropertiesTest.sh \
+	${WRKSRC}/jdk/test/java/util/Locale/LocaleCategory.sh \
+	${WRKSRC}/jdk/test/java/util/Locale/LocaleProviders.sh \
+	${WRKSRC}/jdk/test/java/util/PluggableLocale/ExecTest.sh \
+	${WRKSRC}/jdk/test/java/util/ResourceBundle/Bug6299235Test.sh \
+	${WRKSRC}/jdk/test/java/util/ServiceLoader/basic.sh \
+	${WRKSRC}/jdk/test/java/util/prefs/CheckUserPrefsStorage.sh \
+	${WRKSRC}/jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh \
+	${WRKSRC}/jdk/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatTest.sh \
+	${WRKSRC}/jdk/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatThreadTest.sh \
+	${WRKSRC}/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh \
+	${WRKSRC}/jdk/test/javax/script/CommonSetup.sh \
+	${WRKSRC}/jdk/test/javax/security/auth/Subject/doAs/Test.sh \
+	${WRKSRC}/jdk/test/lib/security/java.policy/Ext_AllPolicy.sh \
+	${WRKSRC}/jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh \
+	${WRKSRC}/jdk/test/sun/net/ftp/MarkResetTest.sh \
+	${WRKSRC}/jdk/test/sun/net/www/http/HttpClient/RetryPost.sh \
+	${WRKSRC}/jdk/test/sun/net/www/protocol/jar/B5105410.sh \
+	${WRKSRC}/jdk/test/sun/net/www/protocol/jar/jarbug/run.sh \
+	${WRKSRC}/jdk/test/sun/security/krb5/runNameEquals.sh \
+	${WRKSRC}/jdk/test/sun/security/mscapi/ShortRSAKey1024.sh \
+	${WRKSRC}/jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh \
+	${WRKSRC}/jdk/test/sun/security/pkcs11/Provider/Login.sh \
+	${WRKSRC}/jdk/test/sun/security/provider/KeyStore/DKSTest.sh \
+	${WRKSRC}/jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh \
+	${WRKSRC}/jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh \
+	${WRKSRC}/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh \
+	${WRKSRC}/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh \
+	${WRKSRC}/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh \
+	${WRKSRC}/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/jarsigner/AlgOptions.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/jarsigner/PercentSign.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/jarsigner/diffend.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/jarsigner/emptymanifest.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/jarsigner/oldsig.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/AltProviderPath.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/NoExtNPE.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/SecretKeyKS.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/StandardAlgName.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/StorePasswordsByShell.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/i18n.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/printssl.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/resource.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/keytool/standard.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/policytool/Alias.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/policytool/ChangeUI.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/policytool/OpenPolicy.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/policytool/SaveAs.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/policytool/UpdatePermissions.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/policytool/UsePolicy.sh \
+	${WRKSRC}/jdk/test/sun/security/tools/policytool/i18n.sh \
+	${WRKSRC}/jdk/test/sun/tools/common/CommonSetup.sh \
+	${WRKSRC}/jdk/test/sun/tools/jconsole/ResourceCheckTest.sh \
+	${WRKSRC}/jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh \
+	${WRKSRC}/langtools/test/tools/javah/ReadOldClass.sh
diff --git a/java/openjdk8/dragonfly/patch-langtools_test_Makefile b/java/openjdk8/dragonfly/patch-langtools_test_Makefile
new file mode 100644
index 00000000000..83b7a2b4854
--- /dev/null
+++ b/java/openjdk8/dragonfly/patch-langtools_test_Makefile
@@ -0,0 +1,14 @@
+--- langtools/test/Makefile~	2017-07-25 10:03:38.831253000 +0200
++++ langtools/test/Makefile	2017-07-25 10:55:31.749902000 +0200
+@@ -42,6 +42,11 @@
+     ARCH=i586
+   endif
+ endif
++ifeq ($(OSNAME), DragonFly)
++  PLATFORM = bsd
++  JT_PLATFORM = linux
++  ARCH = $(shell uname -p)
++endif
+ ifeq ($(OSNAME), Darwin)
+   PLATFORM = bsd
+   ARCH = $(shell uname -m)
-- 
2.13.2

