aboutsummaryrefslogtreecommitdiff
path: root/src/sysmon
diff options
context:
space:
mode:
authorwachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96>2012-11-28 13:50:10 +0000
committerwachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96>2012-11-28 13:50:10 +0000
commit5eac5c2fbac30abe912ca0b516267d2e1b474172 (patch)
tree5f6db8ba930a2b5e3c3f840e1896a59b5ba66bb5 /src/sysmon
parent4559d06856bb6d36c69f0122d3b954eb5ad26015 (diff)
add a test for glibtop
git-svn-id: https://gnunet.org/svn/gnunet@25148 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/sysmon')
-rw-r--r--src/sysmon/Makefile.am14
-rw-r--r--src/sysmon/gnunet-daemon-sysmon.c2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/sysmon/Makefile.am b/src/sysmon/Makefile.am
index 4fed26a3e0..4c4cb1a5b0 100644
--- a/src/sysmon/Makefile.am
+++ b/src/sysmon/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = -I$(top_srcdir)/src/include
+INCLUDES = -I$(top_srcdir)/src/include -I/usr/include/glib-2.0 -I/usr/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -I/usr/include/libgtop-2.0/
pkgcfgdir= $(pkgdatadir)/config.d/
@@ -18,6 +18,9 @@ endif
libexec_PROGRAMS = \
gnunet_daemon_sysmon
+check_PROGRAMS = \
+ test_glibtop
+
gnunet_daemon_sysmon_SOURCES = \
gnunet-daemon-sysmon.c
gnunet_daemon_sysmon_LDADD = \
@@ -25,6 +28,15 @@ gnunet_daemon_sysmon_LDADD = \
$(top_builddir)/src/statistics/libgnunetstatistics.la \
$(GN_LIBINTL)
+test_glibtop_SOURCES = \
+ test_glibtop.c
+test_glibtop_LDADD = \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/statistics/libgnunetstatistics.la \
+ -lgtop-2.0 \
+ $(GN_LIBINTL)
+
+
if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/sysmon/gnunet-daemon-sysmon.c b/src/sysmon/gnunet-daemon-sysmon.c
index 4926a3c1de..387c4bd2e5 100644
--- a/src/sysmon/gnunet-daemon-sysmon.c
+++ b/src/sysmon/gnunet-daemon-sysmon.c
@@ -224,6 +224,7 @@ static void
exec_cmd_proc (void *cls, const char *line)
{
struct SysmonProperty *sp = cls;
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Property output: `%s'\n", line);
if (NULL == line)
{
GNUNET_OS_command_stop (sp->cmd_exec_handle);
@@ -264,6 +265,7 @@ exec_cmd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
sp->cmd_exec_handle = NULL;
GNUNET_break (0);
}
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Property `%s': command `%s' `%s'\n", sp->desc, sp->cmd, sp->cmd_args);
if (NULL == (sp->cmd_exec_handle = GNUNET_OS_command_run (&exec_cmd_proc, sp,
GNUNET_TIME_UNIT_SECONDS,
sp->cmd, sp->cmd,