~ubuntu-branches/ubuntu/vivid/glib2.0/vivid-proposed

« back to all changes in this revision

Viewing changes to .pc/07_disable_tests_on_slow_archs.patch/gio/tests/socket.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2014-03-24 20:58:34 UTC
  • mfrom: (1.66.13)
  • Revision ID: package-import@ubuntu.com-20140324205834-8hsgok8k36ftocqa
Tags: 2.40.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
#include "gnetworkingprivate.h"
31
31
 
 
32
static gboolean ipv6_supported;
 
33
 
32
34
typedef struct {
33
35
  GSocket *server;
34
36
  GSocket *client;
338
340
static void
339
341
test_ipv6_async (void)
340
342
{
 
343
  if (!ipv6_supported)
 
344
    {
 
345
      g_test_skip ("No support for IPv6");
 
346
      return;
 
347
    }
 
348
 
341
349
  test_ip_async (G_SOCKET_FAMILY_IPV6);
342
350
}
343
351
 
420
428
static void
421
429
test_ipv6_sync (void)
422
430
{
 
431
  if (!ipv6_supported)
 
432
    {
 
433
      g_test_skip ("No support for IPv6");
 
434
      return;
 
435
    }
 
436
 
423
437
  test_ip_sync (G_SOCKET_FAMILY_IPV6);
424
438
}
425
439
 
546
560
  GSocketAddress *addr, *v4addr;
547
561
  GInetAddress *iaddr;
548
562
 
 
563
  if (!ipv6_supported)
 
564
    {
 
565
      g_test_skip ("No support for IPv6");
 
566
      return;
 
567
    }
 
568
 
549
569
  data = create_server (G_SOCKET_FAMILY_IPV6, v4mapped_server_thread, TRUE);
550
570
 
551
571
  if (data == NULL)
1032
1052
main (int   argc,
1033
1053
      char *argv[])
1034
1054
{
 
1055
  GSocket *sock;
 
1056
 
1035
1057
  g_test_init (&argc, &argv, NULL);
1036
1058
 
 
1059
  sock = g_socket_new (G_SOCKET_FAMILY_IPV6,
 
1060
                       G_SOCKET_TYPE_STREAM,
 
1061
                       G_SOCKET_PROTOCOL_DEFAULT,
 
1062
                       NULL);
 
1063
  if (sock != NULL)
 
1064
    {
 
1065
      ipv6_supported = TRUE;
 
1066
      g_object_unref (sock);
 
1067
    }
 
1068
 
1037
1069
  g_test_add_func ("/socket/ipv4_sync", test_ipv4_sync);
1038
1070
  g_test_add_func ("/socket/ipv4_async", test_ipv4_async);
1039
1071
  g_test_add_func ("/socket/ipv6_sync", test_ipv6_sync);