Title: [246173] trunk/Tools
Revision
246173
Author
[email protected]
Date
2019-06-06 15:34:49 -0700 (Thu, 06 Jun 2019)

Log Message

Remove SSL-based tests from TestWebKitAPI on some configurations
https://bugs.webkit.org/show_bug.cgi?id=198551
<rdar://problem/51424996>

Reviewed by Jonathan Bedard.

Not all platforms have SSL handy, so don't include SSL-based tests on
those platforms.

* TestWebKitAPI/TCPServer.cpp:
* TestWebKitAPI/TCPServer.h:
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
* TestWebKitAPI/config.h:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (246172 => 246173)


--- trunk/Tools/ChangeLog	2019-06-06 22:08:11 UTC (rev 246172)
+++ trunk/Tools/ChangeLog	2019-06-06 22:34:49 UTC (rev 246173)
@@ -1,3 +1,20 @@
+2019-06-06  Keith Rollin  <[email protected]>
+
+        Remove SSL-based tests from TestWebKitAPI on some configurations
+        https://bugs.webkit.org/show_bug.cgi?id=198551
+        <rdar://problem/51424996>
+
+        Reviewed by Jonathan Bedard.
+
+        Not all platforms have SSL handy, so don't include SSL-based tests on
+        those platforms.
+
+        * TestWebKitAPI/TCPServer.cpp:
+        * TestWebKitAPI/TCPServer.h:
+        * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
+        * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
+        * TestWebKitAPI/config.h:
+
 2019-06-06  Daniel Bates  <[email protected]>
 
         [lldb-webkit] TypeError: cannot concatenate 'str' and 'int' objects when prettify SecurityOrigin with

Modified: trunk/Tools/TestWebKitAPI/TCPServer.cpp (246172 => 246173)


--- trunk/Tools/TestWebKitAPI/TCPServer.cpp	2019-06-06 22:08:11 UTC (rev 246172)
+++ trunk/Tools/TestWebKitAPI/TCPServer.cpp	2019-06-06 22:34:49 UTC (rev 246173)
@@ -31,6 +31,7 @@
 #include <unistd.h>
 #include <wtf/Optional.h>
 
+#if HAVE(SSL)
 extern "C" {
 
 struct BIO;
@@ -58,9 +59,11 @@
 int SSL_set_fd(SSL*, int);
 
 } // extern "C"
+#endif // HAVE(SSL)
 
 namespace TestWebKitAPI {
 
+#if HAVE(SSL)
 template<typename> struct deleter;
 template<> struct deleter<BIO> {
     void operator()(BIO* bio)
@@ -92,6 +95,7 @@
         EVP_PKEY_free(key);
     }
 };
+#endif // HAVE(SSL)
 
 TCPServer::TCPServer(Function<void(Socket)>&& connectionHandler, size_t connections)
     : m_connectionHandler(WTFMove(connectionHandler))
@@ -99,6 +103,7 @@
     listenForConnections(connections);
 }
 
+#if HAVE(SSL)
 TCPServer::TCPServer(Protocol protocol, Function<void(SSL*)>&& secureConnectionHandler)
 {
     auto startSecureConnection = [secureConnectionHandler = WTFMove(secureConnectionHandler)] (Socket socket) {
@@ -184,6 +189,7 @@
     }
     listenForConnections(1);
 }
+#endif // HAVE(SSL)
 
 void TCPServer::listenForConnections(size_t connections)
 {

Modified: trunk/Tools/TestWebKitAPI/TCPServer.h (246172 => 246173)


--- trunk/Tools/TestWebKitAPI/TCPServer.h	2019-06-06 22:08:11 UTC (rev 246172)
+++ trunk/Tools/TestWebKitAPI/TCPServer.h	2019-06-06 22:34:49 UTC (rev 246173)
@@ -29,11 +29,13 @@
 #include <wtf/Function.h>
 #include <wtf/Vector.h>
 
+#if HAVE(SSL)
 extern "C" {
 struct SSL;
 int SSL_read(SSL*, void*, int);
 int SSL_write(SSL*, const void*, int);
 }
+#endif // HAVE(SSL)
 
 namespace TestWebKitAPI {
 
@@ -44,10 +46,12 @@
     static constexpr Port InvalidPort = 0;
     
     TCPServer(Function<void(Socket)>&&, size_t connections = 1);
+#if HAVE(SSL)
     enum class Protocol : bool {
         HTTPS, HTTPSProxy
     };
     TCPServer(Protocol, Function<void(SSL*)>&&);
+#endif // HAVE(SSL)
     ~TCPServer();
     
     Port port() const { return m_port; }

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm (246172 => 246173)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm	2019-06-06 22:08:11 UTC (rev 246172)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm	2019-06-06 22:34:49 UTC (rev 246173)
@@ -315,6 +315,7 @@
     Util::run(&removedCredential);
 }
 
+#if HAVE(SSL)
 static void verifyCertificateAndPublicKey(SecTrustRef trust)
 {
     EXPECT_NOT_NULL(trust);
@@ -431,3 +432,5 @@
 }
 
 } // namespace TestWebKitAPI
+
+#endif // HAVE(SSL)

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm (246172 => 246173)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm	2019-06-06 22:08:11 UTC (rev 246172)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm	2019-06-06 22:34:49 UTC (rev 246173)
@@ -25,6 +25,8 @@
 
 #import "config.h"
 
+#if HAVE(SSL)
+
 #import "TCPServer.h"
 #import "Utilities.h"
 #import <WebKit/WKWebsiteDataStorePrivate.h>
@@ -85,3 +87,4 @@
 
 } // namespace TestWebKitAPI
 
+#endif // HAVE(SSL)

Modified: trunk/Tools/TestWebKitAPI/config.h (246172 => 246173)


--- trunk/Tools/TestWebKitAPI/config.h	2019-06-06 22:08:11 UTC (rev 246172)
+++ trunk/Tools/TestWebKitAPI/config.h	2019-06-06 22:34:49 UTC (rev 246173)
@@ -100,3 +100,7 @@
 #if !PLATFORM(IOS_FAMILY) && !defined(BUILDING_JSCONLY__)
 #define WK_HAVE_C_SPI 1
 #endif
+
+#if !PLATFORM(APPLETV)
+#define HAVE_SSL 1
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to