mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
Merge branch 'wip/smcv/deprecated-prop-followup' into 'main'
Run tests with G_ENABLE_DIAGNOSTIC=1 See merge request GNOME/glib!2889
This commit is contained in:
commit
4bc284fca6
@ -193,6 +193,9 @@ main (int argc, char **argv)
|
|||||||
g_setenv ("GIO_USE_VFS", "local", TRUE);
|
g_setenv ("GIO_USE_VFS", "local", TRUE);
|
||||||
g_setenv ("GSETTINGS_BACKEND", "memory", TRUE);
|
g_setenv ("GSETTINGS_BACKEND", "memory", TRUE);
|
||||||
|
|
||||||
|
/* Disable deprecation warnings when we poke at deprecated properties */
|
||||||
|
g_setenv ("G_ENABLE_DIAGNOSTIC", "0", TRUE);
|
||||||
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
/* Create one test bus for all tests, as we have a lot of very small
|
/* Create one test bus for all tests, as we have a lot of very small
|
||||||
|
@ -158,7 +158,7 @@ python_tests = [
|
|||||||
'codegen.py',
|
'codegen.py',
|
||||||
]
|
]
|
||||||
|
|
||||||
test_env = environment()
|
test_env = environment(common_test_env)
|
||||||
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||||
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||||
test_env.set('GIO_MODULE_DIR', '')
|
test_env.set('GIO_MODULE_DIR', '')
|
||||||
|
@ -258,11 +258,9 @@ if installed_tests_enabled
|
|||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_env = environment()
|
test_env = environment(common_test_env)
|
||||||
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||||
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||||
test_env.set('G_DEBUG', 'gc-friendly')
|
|
||||||
test_env.set('MALLOC_CHECK_', '2')
|
|
||||||
|
|
||||||
test_deps = [libm, thread_dep, libglib_dep]
|
test_deps = [libm, thread_dep, libglib_dep]
|
||||||
test_cargs = ['-DG_LOG_DOMAIN="GLib"', '-UG_DISABLE_ASSERT']
|
test_cargs = ['-DG_LOG_DOMAIN="GLib"', '-UG_DISABLE_ASSERT']
|
||||||
|
@ -56,11 +56,9 @@ if get_option('default_library') != 'static'
|
|||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_env = environment()
|
test_env = environment(common_test_env)
|
||||||
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||||
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||||
test_env.set('G_DEBUG', 'gc-friendly')
|
|
||||||
test_env.set('MALLOC_CHECK_', '2')
|
|
||||||
|
|
||||||
test_deps = [libm, thread_dep, libglib_dep, libgmodule_dep]
|
test_deps = [libm, thread_dep, libglib_dep, libgmodule_dep]
|
||||||
test_cargs = ['-DG_LOG_DOMAIN="GModule"', '-UG_DISABLE_ASSERT']
|
test_cargs = ['-DG_LOG_DOMAIN="GModule"', '-UG_DISABLE_ASSERT']
|
||||||
|
@ -128,12 +128,9 @@ python_tests = [
|
|||||||
'mkenums.py',
|
'mkenums.py',
|
||||||
]
|
]
|
||||||
|
|
||||||
# FIXME: put common bits of test environment() in one location
|
test_env = environment(common_test_env)
|
||||||
test_env = environment()
|
|
||||||
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||||
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||||
test_env.set('G_DEBUG', 'gc-friendly')
|
|
||||||
test_env.set('MALLOC_CHECK_', '2')
|
|
||||||
|
|
||||||
test_deps = [libm, thread_dep, libglib_dep, libgobject_dep]
|
test_deps = [libm, thread_dep, libglib_dep, libgobject_dep]
|
||||||
test_cargs = ['-DG_LOG_DOMAIN="GLib-GObject"', '-UG_DISABLE_ASSERT']
|
test_cargs = ['-DG_LOG_DOMAIN="GLib-GObject"', '-UG_DISABLE_ASSERT']
|
||||||
|
@ -3,12 +3,9 @@ gobject_tests = {
|
|||||||
'performance-threaded' : { 'args' : [ '--seconds', '0' ] },
|
'performance-threaded' : { 'args' : [ '--seconds', '0' ] },
|
||||||
}
|
}
|
||||||
|
|
||||||
# FIXME: put common bits of test environment() in one location
|
test_env = environment(common_test_env)
|
||||||
test_env = environment()
|
|
||||||
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||||
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||||
test_env.set('G_DEBUG', 'gc-friendly')
|
|
||||||
test_env.set('MALLOC_CHECK_', '2')
|
|
||||||
|
|
||||||
test_deps = [libm, thread_dep, libglib_dep, libgobject_dep]
|
test_deps = [libm, thread_dep, libglib_dep, libgobject_dep]
|
||||||
test_cargs = ['-DG_LOG_DOMAIN="GLib-GObject"', '-UG_DISABLE_ASSERT']
|
test_cargs = ['-DG_LOG_DOMAIN="GLib-GObject"', '-UG_DISABLE_ASSERT']
|
||||||
|
@ -336,6 +336,20 @@ test_initially_unowned (void)
|
|||||||
g_assert_cmpint (obj->ref_count, ==, 1);
|
g_assert_cmpint (obj->ref_count, ==, 1);
|
||||||
|
|
||||||
g_object_unref (obj);
|
g_object_unref (obj);
|
||||||
|
|
||||||
|
if (g_test_undefined ())
|
||||||
|
{
|
||||||
|
obj = g_object_new (G_TYPE_INITIALLY_UNOWNED, NULL);
|
||||||
|
|
||||||
|
#ifdef G_ENABLE_DEBUG
|
||||||
|
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
|
||||||
|
"A floating object GInitiallyUnowned * was finalized*");
|
||||||
|
#endif
|
||||||
|
g_object_unref (obj);
|
||||||
|
#ifdef G_ENABLE_DEBUG
|
||||||
|
g_test_assert_expected_messages ();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -945,6 +959,8 @@ main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
|
g_setenv ("G_ENABLE_DIAGNOSTIC", "1", TRUE);
|
||||||
|
|
||||||
g_test_add_func ("/type/fundamentals", test_fundamentals);
|
g_test_add_func ("/type/fundamentals", test_fundamentals);
|
||||||
g_test_add_func ("/type/qdata", test_type_qdata);
|
g_test_add_func ("/type/qdata", test_type_qdata);
|
||||||
g_test_add_func ("/type/query", test_type_query);
|
g_test_add_func ("/type/query", test_type_query);
|
||||||
|
@ -185,7 +185,7 @@ test_interface_check (void)
|
|||||||
|
|
||||||
check_called = 0;
|
check_called = 0;
|
||||||
g_type_add_interface_check (&check_called, check_func);
|
g_type_add_interface_check (&check_called, check_func);
|
||||||
o = g_object_new (bazo_get_type (), NULL);
|
o = g_object_ref_sink (g_object_new (bazo_get_type (), NULL));
|
||||||
g_object_unref (o);
|
g_object_unref (o);
|
||||||
g_assert_cmpint (check_called, ==, 1);
|
g_assert_cmpint (check_called, ==, 1);
|
||||||
g_type_remove_interface_check (&check_called, check_func);
|
g_type_remove_interface_check (&check_called, check_func);
|
||||||
|
@ -2330,6 +2330,11 @@ if want_systemtap and enable_dtrace
|
|||||||
enable_systemtap = true
|
enable_systemtap = true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
common_test_env = [
|
||||||
|
'G_DEBUG=gc-friendly',
|
||||||
|
'G_ENABLE_DIAGNOSTIC=1',
|
||||||
|
'MALLOC_CHECK_=2',
|
||||||
|
]
|
||||||
test_timeout = 60
|
test_timeout = 60
|
||||||
test_timeout_slow = 180
|
test_timeout_slow = 180
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user