gio/tests: Prevent random gio modules from screwing up these tests

https://bugzilla.gnome.org/show_bug.cgi?id=711799
This commit is contained in:
Stef Walter
2013-11-08 14:27:27 +01:00
parent f5c743c939
commit fb8557bdfc
7 changed files with 20 additions and 0 deletions

View File

@@ -193,6 +193,9 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
/* gvfs leaks like a sieve (mostly on purpose) */
g_setenv ("GIO_MODULE_DIR", "/non-existant", TRUE);
g_test_add_func ("/async-splice/copy-chunks", test_copy_chunks);
g_test_add_func ("/async-splice/copy-chunks-threaded-input",
test_copy_chunks_threaded_input);

View File

@@ -186,6 +186,9 @@ main (int argc, char **argv)
GError *error = NULL;
int ret;
/* gvfs leaks like a sieve (mostly on purpose) */
g_setenv ("GIO_MODULE_DIR", "/non-existant", TRUE);
g_test_init (&argc, &argv, NULL);
test_file = g_test_build_filename (G_TEST_DIST, "contexts.c", NULL);

View File

@@ -1188,6 +1188,9 @@ main (int argc,
gint i;
/* We're testing glib, not other (leaky) stuff */
g_setenv ("GIO_MODULE_DIR", "/non-existant", TRUE);
g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugzilla.gnome.org/");

View File

@@ -508,6 +508,8 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
/* We're testing glib, not other (leaky) stuff */
g_setenv ("GIO_MODULE_DIR", "/non-existant", TRUE);
/* Testing whether g_file_new_for_path() or g_file_new_for_uri() always returns non-NULL result */
g_test_add_func ("/g-file/test_g_file_new_null", test_g_file_new_null);

View File

@@ -586,6 +586,9 @@ int
main (int argc,
char *argv[])
{
/* We're testing glib, not other (leaky) stuff */
g_setenv ("GIO_MODULE_DIR", "/non-existant", TRUE);
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/icons/to-string", test_g_icon_to_string);

View File

@@ -176,6 +176,9 @@ test_directory_monitor (void)
int
main (int argc, char *argv[])
{
/* We're testing glib, not other (leaky) stuff */
g_setenv ("GIO_MODULE_DIR", "/non-existant", TRUE);
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/monitor/directory", test_directory_monitor);

View File

@@ -520,6 +520,9 @@ main (int argc, char **argv)
return 0;
}
/* We're testing glib, not other (leaky) stuff */
g_setenv ("GIO_MODULE_DIR", "/non-existant", TRUE);
g_test_init (&argc, &argv, NULL);
init_test (&net127);