| Summary: | Installing unit tests | ||
|---|---|---|---|
| Product: | Telepathy | Reporter: | Alban Crequy <alban.crequy> |
| Component: | tp-glib | Assignee: | Telepathy bugs list <telepathy-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
| Severity: | enhancement | ||
| Priority: | medium | CC: | will |
| Version: | git master | Keywords: | patch |
| Hardware: | Other | ||
| OS: | All | ||
| URL: | http://cgit.collabora.com/git/user/alban/telepathy-glib.git/log/?h=tests4 | ||
| Whiteboard: | review+ | ||
| i915 platform: | i915 features: | ||
|
Description
Alban Crequy
2011-10-04 08:54:00 UTC
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.