summaryrefslogtreecommitdiffhomepage
path: root/pkg/deb
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2018-01-26 17:44:27 +0300
committerAndrei Belov <defan@nginx.com>2018-01-26 17:44:27 +0300
commit51009004af6305af3cc607d3e85ccb723e4be12e (patch)
tree28d72cb473cb10bd212f5a9113b8dff35466b4f2 /pkg/deb
parent9d1410a0bb0ebe792eb3e26ac757dd78847b705e (diff)
downloadunit-51009004af6305af3cc607d3e85ccb723e4be12e.tar.gz
unit-51009004af6305af3cc607d3e85ccb723e4be12e.tar.bz2
Packages: "test" and "test-debug" targets for deb.
Diffstat (limited to '')
-rw-r--r--pkg/deb/Makefile24
1 files changed, 22 insertions, 2 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
index d7929f5e..b0daebeb 100644
--- a/pkg/deb/Makefile
+++ b/pkg/deb/Makefile
@@ -76,7 +76,7 @@ CONFIGURE_ARGS=\
export CR=\\n
default:
- @echo "valid targets: all modules unit $(addprefix unit-, $(MODULES)) clean"
+ @echo "valid targets: all modules unit $(addprefix unit-, $(MODULES)) test test-debug clean"
all: check-build-depends unit modules
@@ -219,10 +219,30 @@ unit-%: check-build-depends-% | debuild-%
find debuild-$*/ -maxdepth 1 -type f -exec cp {} debs/ \;
ln -s debuild-$*/$(SRCDIR)/build $@
+test: unit modules
+ @{ \
+ for so in `find debuild-*/unit-$(VERSION)/debian/build-unit/ -type f -name "*.so"` ; do \
+ soname=`basename $${so}` ; \
+ test -h debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} || \
+ ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} ; \
+ done ; \
+ ( cd debuild/unit-$(VERSION)/debian/build-unit && ./test/run.py ) ; \
+ }
+
+test-debug: unit modules
+ @{ \
+ for so in `find debuild-*/unit-$(VERSION)/debian/build-unit-debug/ -type f -name "*.so"` ; do \
+ soname=`basename $${so}` ; \
+ test -h debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} || \
+ ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} ; \
+ done ; \
+ ( cd debuild/unit-$(VERSION)/debian/build-unit-debug && ./test/run.py ) ; \
+ }
+
clean:
rm -rf debuild debuild-* debs ../../build
find . -maxdepth 1 -type l -delete
-.PHONY: default all modules check-build-depends clean
+.PHONY: default all modules check-build-depends test test-debug clean
.SECONDARY: