summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am9
-rw-r--r--unit/test-session.c35
2 files changed, 43 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 446a26a8..6e661c75 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -60,6 +60,8 @@ builtin_cflags =
noinst_PROGRAMS =
+unit_objects =
+
sbin_PROGRAMS = src/connmand
src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) \
@@ -142,7 +144,8 @@ noinst_PROGRAMS += tools/wispr tools/wifi-scan tools/supplicant-test \
tools/addr-test tools/web-test tools/resolv-test \
tools/dbus-test tools/polkit-test \
tools/iptables-test tools/tap-test tools/wpad-test \
- tools/stats-tool tools/private-network-test
+ tools/stats-tool tools/private-network-test \
+ unit/test-session
tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
@@ -179,6 +182,10 @@ tools_polkit_test_LDADD = @DBUS_LIBS@
tools_iptables_test_LDADD = @GLIB_LIBS@ @XTABLES_LIBS@
tools_private_network_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
+
+unit_test_session_SOURCES = $(gdbus_sources) unit/test-session.c
+unit_test_session_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
+unit_objects += $(unit_test_session_OBJECTS)
endif
test_scripts = test/get-state test/list-profiles test/list-services \
diff --git a/unit/test-session.c b/unit/test-session.c
new file mode 100644
index 00000000..152c80ff
--- /dev/null
+++ b/unit/test-session.c
@@ -0,0 +1,35 @@
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2011 BWM CarIT GmbH. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gdbus.h>
+
+#include "connman.h"
+
+int main(int argc, char *argv[])
+{
+ g_test_init(&argc, &argv, NULL);
+
+ return g_test_run();
+}