Skip to content
Snippets Groups Projects
Commit 9ba5db49 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

glib-compat: accept G_TEST_SLOW environment variable


Provide an alternative way to pass the desired thoroughness of the
test.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 1b874108
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,23 @@ g_unix_get_passwd_entry_qemu(const gchar *user_name, GError **error)
}
#endif /* G_OS_UNIX */
static inline bool
qemu_g_test_slow(void)
{
static int cached = -1;
if (cached == -1) {
cached = g_test_slow() || getenv("G_TEST_SLOW") != NULL;
}
return cached;
}
#undef g_test_slow
#undef g_test_thorough
#undef g_test_quick
#define g_test_slow() qemu_g_test_slow()
#define g_test_thorough() qemu_g_test_slow()
#define g_test_quick() (!qemu_g_test_slow())
#pragma GCC diagnostic pop
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment