Commit 5e66241c authored by Simon McVittie's avatar Simon McVittie

Merge branch 'reduce-test-refs-run-time' into 'master'

Decrease the runtime of test-refs under Windows

Closes #244

See merge request !65
parents 78d1cf2e 48538357
Pipeline #12267 passed with stage
in 30 minutes and 28 seconds
......@@ -198,6 +198,9 @@ static void
setup (Fixture *f,
gconstpointer data)
{
#ifdef DBUS_WIN
const char *dbus_test_slow = NULL;
#endif
if (!dbus_threads_init_default ())
g_error ("OOM");
......@@ -207,17 +210,21 @@ setup (Fixture *f,
f->n_threads = N_THREADS;
f->n_refs = N_REFS;
// wine sets WINESERVERSOCKET for its child processes automatically
if (g_getenv ("WINESERVERSOCKET") != NULL)
#ifdef DBUS_WIN
dbus_test_slow = g_getenv ("DBUS_TEST_SLOW");
if (dbus_test_slow == NULL || atoi (dbus_test_slow) < 1)
{
/* Our reference-counting is really slow under Wine (it involves
* IPC to wineserver). Do fewer iterations: enough to demonstrate
* that it works, rather than a performance test.
* IPC to wineserver) or Windows 7 guest on VirtualBox (5.22).
* Do fewer iterations: enough to demonstrate that it works,
* rather than seriously trying to reproduce race conditions.
*/
f->n_threads = 10;
f->n_refs = 10;
f->n_threads = 100;
f->n_refs = 1000;
g_info ("reducing number of threads/refs to %d/%d", f->n_threads, f->n_refs);
}
#endif
f->loop = _dbus_loop_new ();
g_assert (f->loop != NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment