reftest-snapshot.c: Fix running reftests on Visual Studio
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 8 May 2023 07:10:17 +0000 (15:10 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 8 May 2023 07:10:17 +0000 (15:10 +0800)
On Visual Studio-like builds, shove a ".dll" suffix for the reftest
module so that we look for the correct DLL when running the tests.

testsuite/reftests/reftest-snapshot.c

index d2ecc0ee65ad0375a69e33b8d3ad5019e9ee62f4..d999a1e852fe28aa3d37f419f63573a9e85b542f 100644 (file)
@@ -67,7 +67,13 @@ reftest_scope_create_closure (GtkBuilderScope        *scope,
       break;
 
     case 2:
+#ifdef _MSC_VER
+      char *modulefile = g_strconcat (split[0], ".", G_MODULE_SUFFIX, NULL);
+      module = reftest_module_new (self->directory, modulefile);
+      g_free (modulefile);
+#else
       module = reftest_module_new (self->directory, split[0]);
+#endif
       if (module == NULL)
         {
           g_set_error (error,