[glib-networking/wip/openssl: 19/41] Tests: Do Not Use GIO_EXTRA_MODULES on MSVC
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/openssl: 19/41] Tests: Do Not Use GIO_EXTRA_MODULES on MSVC
- Date: Tue, 19 Jan 2016 08:23:48 +0000 (UTC)
commit b1c4fb1cc26112f2ae0f28d7da8b359ed4ec5adb
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 9d1b77e..b5c34a2 100644
--- a/tls/tests/certificate.c
+++ b/tls/tests/certificate.c
@@ -544,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);
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index 4fcd324..3e15fbe 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -29,7 +29,10 @@
#endif
#include <gio/gio.h>
+
+#ifdef WITH_BACKEND_GNUTLS
#include <gnutls/gnutls.h>
+#endif
#include <sys/types.h>
#include <string.h>
@@ -2009,7 +2012,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]