Merge "[lib-fix] Fixed return value of kdbus_write_msg Change-Id: Ia3a45a6a79b4078929...
[platform/upstream/dbus.git] / bus / test-launch-helper.c
index e7ac18b..e9ba412 100644 (file)
  * 
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
 
+#include <config.h>
 #include "test.h"
 #include "activation-helper.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <dbus/dbus-internals.h>
+#include <dbus/dbus-misc.h>
 
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
 static void
 die (const char *failure)
 {
@@ -55,7 +57,7 @@ test_post_hook (const char *name)
 {
   check_memleaks (name);
 }
-#endif /* DBUS_BUILD_TESTS */
+#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
 
 
 #ifdef ACTIVATION_LAUNCHER_DO_OOM
@@ -96,7 +98,7 @@ bus_activation_helper_oom_test (void *data)
 int
 main (int argc, char **argv)
 {
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
   const char *dir;
   DBusString config_file;
 
@@ -121,8 +123,8 @@ main (int argc, char **argv)
     return 1;
 
   /* use a config file that will actually work... */
-  _dbus_setenv ("TEST_LAUNCH_HELPER_CONFIG",
-                _dbus_string_get_const_data (&config_file));
+  dbus_setenv ("TEST_LAUNCH_HELPER_CONFIG",
+               _dbus_string_get_const_data (&config_file));
 
   _dbus_string_free (&config_file);
 
@@ -136,7 +138,7 @@ main (int argc, char **argv)
   printf ("%s: Success\n", argv[0]);
 
   return 0;
-#else /* DBUS_BUILD_TESTS */
+#else /* DBUS_ENABLE_EMBEDDED_TESTS */
 
   printf ("Not compiled with test support\n");