Ticket #736: 0.36-tests-module-suffix.patch

File 0.36-tests-module-suffix.patch, 6.5 kB (added by yselkowitz, 5 months ago)

G_MODULE_SUFFIX patch for 0.36 tests

  • src/libopensync-0.36/tests/format-tests/check_format_env.c

    old new  
    369369        fail_unless(error == NULL, NULL); 
    370370         
    371371        char *curdir = g_get_current_dir(); 
    372         char *path = g_strdup_printf("%s/mock-format.so", curdir); 
     372        char *path = g_strdup_printf("%s/mock-format.%s", curdir, G_MODULE_SUFFIX); 
    373373        fail_unless(osync_module_load(module, path, &error), NULL); 
    374374        fail_unless(error == NULL, NULL); 
    375375        g_free(path); 
  • src/libopensync-0.36/tests/module-tests/check_module.c

    old new  
    2727        fail_unless(error == NULL, NULL); 
    2828         
    2929        char *curdir = g_get_current_dir(); 
    30         char *path = g_strdup_printf("%s/mock-format.so", curdir); 
     30        char *path = g_strdup_printf("%s/mock-format.%s", curdir, G_MODULE_SUFFIX); 
    3131        fail_unless(osync_module_load(module, path, &error), NULL); 
    3232        fail_unless(error == NULL, NULL); 
    3333        g_free(path); 
     
    5151        fail_unless(error == NULL, NULL); 
    5252         
    5353        char *curdir = g_get_current_dir(); 
    54         char *path = g_strdup_printf("%s/does-not-exist.so", curdir); 
     54        char *path = g_strdup_printf("%s/does-not-exist.%s", curdir, G_MODULE_SUFFIX); 
    5555        fail_unless(!osync_module_load(module, path, &error), NULL); 
    5656        fail_unless(error != NULL, NULL); 
    5757        g_free(path); 
     
    7474        fail_unless(error == NULL, NULL); 
    7575         
    7676        char *curdir = g_get_current_dir(); 
    77         char *path = g_strdup_printf("%s/mock-format.so", curdir); 
     77        char *path = g_strdup_printf("%s/mock-format.%s", curdir, G_MODULE_SUFFIX); 
    7878        fail_unless(osync_module_load(module, path, &error), NULL); 
    7979        fail_unless(error == NULL, NULL); 
    8080        g_free(path); 
     
    102102        fail_unless(error == NULL, NULL); 
    103103         
    104104        char *curdir = g_get_current_dir(); 
    105         char *path = g_strdup_printf("%s/mock-format.so", curdir); 
     105        char *path = g_strdup_printf("%s/mock-format.%s", curdir, G_MODULE_SUFFIX); 
    106106        fail_unless(osync_module_load(module, path, &error), NULL); 
    107107        fail_unless(error == NULL, NULL); 
    108108        g_free(path); 
     
    131131        fail_unless(error == NULL, NULL); 
    132132         
    133133        char *curdir = g_get_current_dir(); 
    134         char *path = g_strdup_printf("%s/mock-format.so", curdir); 
     134        char *path = g_strdup_printf("%s/mock-format.%s", curdir, G_MODULE_SUFFIX); 
    135135        fail_unless(osync_module_load(module, path, &error), NULL); 
    136136        fail_unless(error == NULL, NULL); 
    137137        g_free(path); 
     
    158158        fail_unless(error == NULL, NULL); 
    159159         
    160160        char *curdir = g_get_current_dir(); 
    161         char *path = g_strdup_printf("%s/mock-format.so", curdir); 
     161        char *path = g_strdup_printf("%s/mock-format.%s", curdir, G_MODULE_SUFFIX); 
    162162        fail_unless(osync_module_load(module, path, &error), NULL); 
    163163        fail_unless(error == NULL, NULL); 
    164164        g_free(path); 
  • src/libopensync-0.36/tests/support.c

    old new  
    4848                abort(); 
    4949        g_free(command);*/ 
    5050         
    51         command = g_strdup_printf("cp ./mock-plugin/mock-sync.so %s", testbed); 
     51        command = g_strdup_printf("cp ./mock-plugin/mock-sync.%s %s", G_MODULE_SUFFIX, testbed); 
    5252        if (system(command)) 
    5353                abort(); 
    5454        g_free(command); 
    5555         
    56         command = g_strdup_printf("cp ./mock-plugin/mock-format.so %s", testbed); 
     56        command = g_strdup_printf("cp ./mock-plugin/mock-format.%s %s", G_MODULE_SUFFIX, testbed); 
    5757        if (system(command)) 
    5858                abort(); 
    5959        g_free(command); 
    6060         
    61         command = g_strdup_printf("cp -R ../formats/*.so %s", testbed); 
     61        command = g_strdup_printf("cp -R ../formats/*.%s %s", G_MODULE_SUFFIX, testbed); 
    6262        if (system(command)) 
    6363                abort(); 
    6464        g_free(command);