X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Makefile.am;h=8471b4f53245e0ce30765d5367c7c1dbbf982b1e;hb=2df368cace616e67a6fa5968e23e65a3d5aa0d67;hp=c740aca6443d5e0ed1a1df66cf74c7ab950d7a5e;hpb=ef2bf51d04aaf01fa0cabdcaf905b23423067662;p=ric-plt%2Fsdl.git diff --git a/Makefile.am b/Makefile.am index c740aca..8471b4f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,6 +35,7 @@ libsdl_la_SOURCES = \ include/private/namespaceconfigurations.hpp \ include/private/namespaceconfigurationsimpl.hpp \ include/private/namespacevalidator.hpp \ + include/private/stdstreamlogger.hpp \ include/private/syncstorageimpl.hpp \ include/private/system.hpp \ include/private/timer.hpp \ @@ -67,6 +68,7 @@ libsdl_la_SOURCES = \ src/publisherid.cpp \ src/rejectedbybackend.cpp \ src/rejectedbysdl.cpp \ + src/stdstreamlogger.cpp \ src/syncstorage.cpp \ src/syncstorageimpl.cpp \ src/system.cpp \ @@ -85,6 +87,7 @@ libsdl_la_SOURCES += \ include/private/redis/asyncdatabasediscovery.hpp \ include/private/redis/asyncredisreply.hpp \ include/private/redis/asyncredisstorage.hpp \ + include/private/redis/asyncsentineldatabasediscovery.hpp \ include/private/redis/contents.hpp \ include/private/redis/contentsbuilder.hpp \ include/private/redis/databaseinfo.hpp \ @@ -93,6 +96,7 @@ libsdl_la_SOURCES += \ src/redis/asyncdatabasediscovery.cpp \ src/redis/asyncredisreply.cpp \ src/redis/asyncredisstorage.cpp \ + src/redis/asyncsentineldatabasediscovery.cpp \ src/redis/contentsbuilder.cpp endif if HIREDIS @@ -144,19 +148,15 @@ libshareddatalayercli_la_SOURCES = \ libshareddatalayercli_la_CPPFLAGS = \ $(BASE_CPPFLAGS) \ - $(PTHREAD_CFLAGS) \ $(BOOST_CPPFLAGS) libshareddatalayercli_la_LDFLAGS = \ $(BOOST_LDFLAGS) \ - $(PTHREAD_CFLAGS) \ -release $(PACKAGE_VERSION) libshareddatalayercli_la_LIBADD = \ $(BOOST_FILESYSTEM_LIB) \ $(BOOST_PROGRAM_OPTIONS_LIB) \ $(BOOST_SYSTEM_LIB) \ - $(PTHREAD_LIBS) \ -lboost_system \ - -lpthread \ libsdl.la pkgincludedir = \ @@ -176,6 +176,12 @@ pkginclude_HEADERS = \ include/sdl/rejectedbysdl.hpp \ include/sdl/syncstorage.hpp +pkgtstincludedir = \ + $(includedir)/sdl/tst +pkgtstinclude_HEADERS = \ + include/sdl/tst/mockableasyncstorage.hpp \ + include/sdl/tst/mockablesyncstorage.hpp + pkgconfigdir = \ ${libdir}/pkgconfig nodist_pkgconfig_DATA = \ @@ -199,15 +205,12 @@ sdltool_SOURCES = \ src/cli/main.cpp sdltool_CPPFLAGS = \ $(BASE_CPPFLAGS) \ - $(PTHREAD_CFLAGS) \ $(BOOST_CPPFLAGS) sdltool_LDFLAGS = \ - $(PTHREAD_CFLAGS) \ $(BOOST_LDFLAGS) sdltool_LDADD = \ $(BOOST_PROGRAM_OPTIONS_LIB) \ libsdl.la \ - $(PTHREAD_LIBS) \ -lboost_system \ libshareddatalayercli.la @@ -241,14 +244,11 @@ libgmock_la_SOURCES = \ 3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-port.h libgmock_la_CPPFLAGS = \ - $(PTHREAD_CFLAGS) \ -I$(top_srcdir)/3rdparty/googletest/googlemock/include/ \ -I$(top_srcdir)/3rdparty/googletest/googlemock/ \ -I$(top_srcdir)/3rdparty/googletest/googletest/include/ -libgmock_la_LDFLAGS = \ - $(PTHREAD_CFLAGS) libgmock_la_LIBADD = \ - $(PTHREAD_LIBS) + -lpthread libgtest_la_SOURCES = \ 3rdparty/googletest/googletest/src/gtest-all.cc \ @@ -288,13 +288,10 @@ libgtest_la_SOURCES = \ 3rdparty/googletest/googletest/include/gtest/internal/custom/gtest-printers.h libgtest_la_CPPFLAGS = \ - $(PTHREAD_CFLAGS) \ -I$(top_srcdir)/3rdparty/googletest/googletest/include/ \ -I$(top_srcdir)/3rdparty/googletest/googletest/ -libgtest_la_LDFLAGS = \ - $(PTHREAD_CFLAGS) libgtest_la_LIBADD = \ - $(PTHREAD_LIBS) + -lpthread check_PROGRAMS = \ testrunner @@ -325,6 +322,8 @@ testrunner_SOURCES = \ tst/hostandport_test.cpp \ tst/invalidnamespace_test.cpp \ tst/main.cpp \ + tst/mockableasyncstorage_test.cpp \ + tst/mockablesyncstorage_test.cpp \ tst/namespaceconfigurations_test.cpp \ tst/namespaceconfigurationsimpl_test.cpp \ tst/namespacevalidator_test.cpp \ @@ -345,6 +344,7 @@ testrunner_SOURCES += \ tst/asynccommanddispatcher_test.cpp \ tst/asyncdatabasediscovery_test.cpp \ tst/asyncredisstorage_test.cpp \ + tst/asyncsentineldatabasediscovery_test.cpp \ tst/asyncstorageimpl_test.cpp \ tst/contents_test.cpp \ tst/contentsbuilder_test.cpp \ @@ -387,8 +387,40 @@ TESTS = \ test: testrunner ./run-tests.sh +if ENABLE_GCOV +AM_CXXFLAGS= -O0 --coverage +AM_LDFLAGS= --coverage + +test_gcov: test + @for p in src/.libs/*.o src/redis/.libs/*.o; do \ + gcov -abcfru $$p 1>/dev/null; \ + done + mkdir -p @GCOV_REPORT_DIR@ + mv *.gcov @GCOV_REPORT_DIR@ + ls -la @GCOV_REPORT_DIR@ +endif + +if ENABLE_RPM_BUILD +rpm-pkg: + rpmbuild --nodeps --nocheck -bb rpm/sdl.spec --define="_sourcedir $(top_srcdir)" --define="_builddir $(top_srcdir)" --define="_rpmdir .." + mkdir -p @RPM_DIR@ + cp ../x86_64/*.rpm @RPM_DIR@ +endif + + +if ENABLE_DEB_BUILD +deb-pkg: + DEB_BUILD_OPTIONS='nocheck noddebs' debuild -b -us -uc + mkdir -p @DEB_DIR@ + cp ../*.deb @DEB_DIR@ +endif + clean-local: rm -f libsdl.pc +if ENABLE_GCOV + rm -rf @GCOV_REPORT_DIR@ + @find . -name '*.gcno' -o -name '*.gcda'| xargs -r rm +endif @DX_RULES@