~ubuntu-branches/debian/sid/glib2.0/sid

« back to all changes in this revision

Viewing changes to gio/tests/gdbus-threading.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 06:25:57 UTC
  • mfrom: (1.27.14) (3.1.181 experimental)
  • Revision ID: package-import@ubuntu.com-20130508062557-i7gbku66mls70gi2
Tags: 2.36.1-2
Merge experimental branch, upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
406
406
 
407
407
      /* elapsed_msec should be 4000 msec +/- change for overhead/inaccuracy */
408
408
      g_assert_cmpint (elapsed_msec, >=, 3950);
409
 
      g_assert_cmpint (elapsed_msec,  <, 6000);
 
409
#if !defined(__arm__)
 
410
      g_assert_cmpint (elapsed_msec,  <, 8000);
 
411
#endif
410
412
 
411
413
      g_print (" ");
412
414
    }
582
584
  GError *error;
583
585
  gint ret;
584
586
 
585
 
  g_type_init ();
586
587
  g_test_init (&argc, &argv, NULL);
587
588
 
588
 
  /* all the tests use a session bus with a well-known address that we can bring up and down
589
 
   * using session_bus_up() and session_bus_down().
590
 
   */
591
 
  g_unsetenv ("DISPLAY");
592
 
  g_setenv ("DBUS_SESSION_BUS_ADDRESS", session_bus_get_temporary_address (), TRUE);
593
 
 
594
589
  session_bus_up ();
595
590
 
596
 
  /* TODO: wait a bit for the bus to come up.. ideally session_bus_up() won't return
597
 
   * until one can connect to the bus but that's not how things work right now
598
 
   */
599
 
  usleep (500 * 1000);
600
 
 
601
591
  /* this is safe; testserver will exit once the bus goes away */
602
 
  g_assert (g_spawn_command_line_async (SRCDIR "/gdbus-testserver.py", NULL));
 
592
  g_assert (g_spawn_command_line_async ("./gdbus-testserver", NULL));
603
593
 
604
594
  /* wait for the service to come up */
605
595
  usleep (500 * 1000);