[glib-networking/wip/openssl: 7/9] Tests: Do Not Use GIO_EXTRA_MODULES on MSVC



commit 11f0ff49768bcc6a5d427e3cf54a6ed0f60e7b66
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Sep 8 16:02:51 2015 +0800

    Tests: Do Not Use GIO_EXTRA_MODULES on MSVC
    
    The Visual Studio builds actually copies the freshly built GIO
    modules to the appropriate location upon completion of build, and
    generates the giomodule.cache, so we don't really need the
    GIO_EXTRA_MODULES envvar here, plus the test sources define it
    according to the autotools build layout.
    
    Also, update the TLS tests to not include GNUTLS items when we are
    not building against the GNUTLS backend.

 proxy/tests/gnome.c       |    3 +++
 proxy/tests/libproxy.c    |    5 ++++-
 tls/tests/certificate.c   |    6 +++++-
 tls/tests/connection.c    |    9 ++++++++-
 tls/tests/file-database.c |    8 +++++++-
 5 files changed, 27 insertions(+), 4 deletions(-)
---
diff --git a/proxy/tests/gnome.c b/proxy/tests/gnome.c
index 578ac49..dd6594e 100644
--- a/proxy/tests/gnome.c
+++ b/proxy/tests/gnome.c
@@ -158,7 +158,10 @@ main (int   argc,
 {
   g_test_init (&argc, &argv, NULL);
 
+#ifndef _MSC_VER
   g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/proxy/gnome/.libs", TRUE);
+#endif
+
   g_setenv ("GIO_USE_PROXY_RESOLVER", "gnome", TRUE);
   g_setenv ("GSETTINGS_BACKEND", "memory", TRUE);
   g_setenv ("DESKTOP_SESSION", "gnome", TRUE);
diff --git a/proxy/tests/libproxy.c b/proxy/tests/libproxy.c
index f46c27c..5834795 100644
--- a/proxy/tests/libproxy.c
+++ b/proxy/tests/libproxy.c
@@ -81,7 +81,10 @@ main (int   argc,
   g_unsetenv ("KDE_FULL_SESSION");
 
   /* Use the just-built libproxy module */
-  g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/proxy/libproxy/.libs", TRUE);
+#ifndef _MSC_VER
+  g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/proxy/gnome/.libs", TRUE);
+#endif
+
 
   g_test_add_vtable ("/proxy/libproxy/uri", 0, NULL,
                     reset_proxy_settings, test_proxy_uri, NULL);
diff --git a/tls/tests/certificate.c b/tls/tests/certificate.c
index 991087e..6bc5cf2 100644
--- a/tls/tests/certificate.c
+++ b/tls/tests/certificate.c
@@ -545,7 +545,11 @@ main (int   argc,
   g_test_init (&argc, &argv, NULL);
 
   g_setenv ("GSETTINGS_BACKEND", "memory", TRUE);
-  g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/tls/" BACKEND "/.libs", TRUE);
+
+#ifndef _MSC_VER
+  g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/proxy/gnome/.libs", TRUE);
+#endif
+
   g_setenv ("GIO_USE_TLS", BACKEND, TRUE);
   g_assert (g_ascii_strcasecmp (G_OBJECT_TYPE_NAME (g_tls_backend_get_default ()), "GTlsBackend" BACKEND) == 
0);
 
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index beb8243..9432429 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -27,7 +27,10 @@
 #include "mock-interaction.h"
 
 #include <gio/gio.h>
+
+#ifdef WITH_BACKEND_GNUTLS
 #include <gnutls/gnutls.h>
+#endif
 
 #include <sys/types.h>
 #include <string.h>
@@ -2005,7 +2008,11 @@ main (int   argc,
   g_test_bug_base ("http://bugzilla.gnome.org/";);
 
   g_setenv ("GSETTINGS_BACKEND", "memory", TRUE);
-  g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/tls/" BACKEND "/.libs", TRUE);
+
+#ifndef _MSC_VER
+  g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/proxy/gnome/.libs", TRUE);
+#endif
+
   g_setenv ("GIO_USE_TLS", BACKEND, TRUE);
   g_assert (g_ascii_strcasecmp (G_OBJECT_TYPE_NAME (g_tls_backend_get_default ()), "GTlsBackend" BACKEND) == 
0);
 
diff --git a/tls/tests/file-database.c b/tls/tests/file-database.c
index c27521e..01d3973 100644
--- a/tls/tests/file-database.c
+++ b/tls/tests/file-database.c
@@ -26,7 +26,9 @@
 
 #include <gio/gio.h>
 
+#ifdef WITH_BACKEND_GNUTLS
 #include "gnutls/gtlscertificate-gnutls.h"
+#endif
 
 #include <sys/types.h>
 #include <string.h>
@@ -542,7 +544,11 @@ main (int   argc,
   g_test_init (&argc, &argv, NULL);
 
   g_setenv ("GSETTINGS_BACKEND", "memory", TRUE);
-  g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/tls/" BACKEND "/.libs", TRUE);
+
+#ifndef _MSC_VER
+  g_setenv ("GIO_EXTRA_MODULES", TOP_BUILDDIR "/proxy/gnome/.libs", TRUE);
+#endif
+
   g_setenv ("GIO_USE_TLS", BACKEND, TRUE);
   g_assert (g_ascii_strcasecmp (G_OBJECT_TYPE_NAME (g_tls_backend_get_default ()), "GTlsBackend" BACKEND) == 
0);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]