From 80bb3a66ddb7aa949b03f657dab85847d41c00b4 Mon Sep 17 00:00:00 2001
From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
Date: Thu, 21 Jun 2012 15:34:59 -0400
Subject: [PATCH] [#11848] Compile and run test with gnome client

---
 gnome/tests/check_config.c   |  3 +++
 gnome/tests/check_contacts.c |  2 ++
 gnome/tests/check_dbus.c     |  3 +++
 gnome/tests/check_global.c   |  3 +++
 hudson-sflphone-script.sh    | 22 +++++++++++++++++-----
 5 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/gnome/tests/check_config.c b/gnome/tests/check_config.c
index dc330c0e4b..d6461148e6 100644
--- a/gnome/tests/check_config.c
+++ b/gnome/tests/check_config.c
@@ -31,6 +31,8 @@
 #include <check.h>
 #include <stdlib.h>
 
+#define XML_OUTPUT  "gnome-check-config.xml"
+
 Suite *
 config_suite(void)
 {
@@ -45,6 +47,7 @@ main(void)
     int number_failed;
     Suite *s = config_suite();
     SRunner *sr = srunner_create(s);
+    srunner_set_xml(sr, XML_OUTPUT);
     srunner_run_all(sr, CK_NORMAL);
     number_failed = srunner_ntests_failed(sr);
     srunner_free(sr);
diff --git a/gnome/tests/check_contacts.c b/gnome/tests/check_contacts.c
index e5c17ea45b..497beadb91 100644
--- a/gnome/tests/check_contacts.c
+++ b/gnome/tests/check_contacts.c
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include "../src/contacts/addressbook.h"
 
+#define XML_OUTPUT  "gnome-check-contacts.xml"
 
 START_TEST(test_eds)
 {
@@ -54,6 +55,7 @@ main(void)
     int number_failed;
     Suite *s = contacts_suite();
     SRunner *sr = srunner_create(s);
+    srunner_set_xml(sr, XML_OUTPUT);
     srunner_run_all(sr, CK_NORMAL);
     number_failed = srunner_ntests_failed(sr);
     srunner_free(sr);
diff --git a/gnome/tests/check_dbus.c b/gnome/tests/check_dbus.c
index a8d96a0503..747d39915d 100644
--- a/gnome/tests/check_dbus.c
+++ b/gnome/tests/check_dbus.c
@@ -31,6 +31,8 @@
 
 #include "../src/dbus/dbus.h"
 
+#define XML_OUTPUT  "gnome-check-dbus.xml"
+
 START_TEST(test_dbus_connect)
 {
     GError *error = NULL;
@@ -56,6 +58,7 @@ main(void)
     int number_failed;
     Suite *s = dbus_suite();
     SRunner *sr = srunner_create(s);
+    srunner_set_xml(sr, XML_OUTPUT);
     srunner_run_all(sr, CK_NORMAL);
     number_failed = srunner_ntests_failed(sr);
     srunner_free(sr);
diff --git a/gnome/tests/check_global.c b/gnome/tests/check_global.c
index 09ead1053e..1efc524ad7 100644
--- a/gnome/tests/check_global.c
+++ b/gnome/tests/check_global.c
@@ -36,6 +36,8 @@
 #include "../src/sflphone_const.h"
 #include "../src/str_utils.h"
 
+#define XML_OUTPUT  "gnome-check-global.xml"
+
 account_t* create_test_account(gchar *alias)
 {
     account_t *test;
@@ -150,6 +152,7 @@ main(void)
     int number_failed;
     Suite *s = global_suite();
     SRunner *sr = srunner_create(s);
+    srunner_set_xml(sr, XML_OUTPUT);
     srunner_run_all(sr, CK_NORMAL);
     number_failed = srunner_ntests_failed(sr);
     srunner_free(sr);
diff --git a/hudson-sflphone-script.sh b/hudson-sflphone-script.sh
index aaacf5164e..1748a7ddf6 100755
--- a/hudson-sflphone-script.sh
+++ b/hudson-sflphone-script.sh
@@ -120,11 +120,6 @@ function build_daemon {
 	make clean
 	# Compile src code
 	make -j
-	# Generate documentation
-	make doc
-	if [ $DOXYGEN == 1 ]; then
-		gen_doxygen
-	fi
 	# Remove the previous XML test file
 	rm -rf $XML_RESULTS
 	# Compile unit tests
@@ -133,6 +128,23 @@ function build_daemon {
 }
 
 function build_gnome {
+	# Compile the daemon
+	pushd daemon
+	make distclean
+	./autogen.sh
+  # Compile pjproject first
+	pushd libs/pjproject
+	./autogen.sh
+	./configure
+	make && make dep
+	popd
+	./configure --prefix=/usr
+	make clean
+	# Compile src code
+	make -j
+  sudo make install
+	popd
+
 	# Compile the plugins
 	pushd plugins
 	make distclean
-- 
GitLab