Unit tests can be run with "make check" in the source tree but they cannot be installed. Adding a configure option to install them could be useful for fully automated tests. (Same bug as Bug #41448 but for tp-glib)
Why not renaming the d-bus service files dir to dbus-installed (like you did in gabble)? Some tests depend on the examples, not on the source code. I think those tests should be installed too.
(In reply to comment #1) > Why not renaming the d-bus service files dir to dbus-installed (like you did in > gabble)? done > Some tests depend on the examples, not on the source code. I think those tests > should be installed too. done.
Looks fine to me.
Actually: + gchar *command_installed[] = { + g_strdup_printf ("%s/%s", + libexec, libexec is potentially NULL. I think printf-style functions on some platforms are not NULL-safe. - if (!g_spawn_async (NULL, command, NULL, 0, NULL, NULL, NULL, &error)) + if (abs_top_builddir != NULL) + { + if (!g_spawn_async (NULL, command_uninstalled, NULL, 0, NULL, NULL, NULL, + &error)) + { + g_error ("g_spawn_async: %s", error->message); + } + } + else { - g_error ("g_spawn_async: %s", error->message); + if (!g_spawn_async (NULL, command_installed, NULL, 0, NULL, NULL, NULL, + &error)) + { + g_error ("g_spawn_async: %s", error->message); + } } This code duplication is a bit ugly. You could rework it to make it more readable, for instance by having command[0] assigned based on abs_top_builddir.
(In reply to comment #4) > Actually: > > > + gchar *command_installed[] = { > + g_strdup_printf ("%s/%s", > + libexec, > > libexec is potentially NULL. I think printf-style functions on some platforms > are not NULL-safe. (...) > > This code duplication is a bit ugly. You could rework it to make it more > readable, for instance by having command[0] assigned based on abs_top_builddir. fixed.
Looks good. If make check keeps working in every case, please merge with master.
and merged to git master: 45b8e51..d2e6b77
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.