Rename ci Docker file
[ric-plt/sdl.git] / Makefile.am
index 9537ab8..8471b4f 100644 (file)
@@ -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 = \
@@ -316,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 \
@@ -379,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@