Add unit tests and changes related

Base unit tests have been added with the means to generate
gcov coverage information and a small amounto of coverage
data.  Some changes were made to the code to make testing
coverage better and to fix identified issues.

Most important are the unique smart ptr changes; the
framework prototypes now require them to be shared pointers
as they are not released/reallocated (e.g. message Send()).

Issue-ID: RIC-148

Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: Ibc593ddc8687ce6d727bf6d3e2939c02f1e0afef
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 0000000..fcbf361
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,21 @@
+
+coverage_opts = -ftest-coverage -fprofile-arcs
+
+binaries = unit_test 
+
+# RMR emulation
+rmr_em.o::	rmr_em.c
+	cc -g rmr_em.c -c
+
+unit_test:: unit_test.cpp rmr_em.o
+	# do NOT link the xapp lib; we include all modules in the test programme
+	g++ -g $(coverage_opts) -I ../src/messaging unit_test.cpp -o unit_test rmr_em.o  -lpthread
+
+# prune gcov files generated by system include files
+clean::
+	rm -f *.h.gcov *.c.gcov
+
+# ditch anything that can be rebuilt
+nuke::
+	rm -f *.a *.o *.gcov *.gcda *.gcno core a.out $(binaries)
+