From c60142efda817f030a7495cd6fe4a19953e55afa Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 21 May 2013 13:40:27 +0200 Subject: Make an ipa-tests package Rename the 'tests' directory to 'ipa-tests', and create an ipa-tests RPM containing the test suite Part of the work for: https://fedorahosted.org/freeipa/ticket/3654 --- Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 550e529e..484144fd 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ endif PYTHON ?= $(shell rpm -E %__python) -all: bootstrap-autogen server +all: bootstrap-autogen server tests @for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done @@ -71,7 +71,7 @@ client-autogen: version-update cd ipa-client; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi cd install; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi -install: all server-install +install: all server-install tests-install @for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done @@ -118,6 +118,8 @@ version-update: release-update > ipapython/setup.py sed -e s/__VERSION__/$(IPA_VERSION)/ ipapython/version.py.in \ > ipapython/version.py + sed -e s/__VERSION__/$(IPA_VERSION)/ ipatests/setup.py.in \ + > ipatests/setup.py perl -pi -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" ipapython/version.py perl -pi -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" ipapython/version.py sed -e s/__VERSION__/$(IPA_VERSION)/ daemons/ipa-version.h.in \ @@ -149,6 +151,16 @@ server-install: server $(PYTHON) setup.py install --root $(DESTDIR); \ fi +tests: version-update + cd ipatests; $(PYTHON) setup.py build + +tests-install: tests + if [ "$(DESTDIR)" = "" ]; then \ + cd ipatests; $(PYTHON) setup.py install; \ + else \ + cd ipatests; $(PYTHON) setup.py install --root $(DESTDIR); \ + fi + archive: -mkdir -p dist git archive --format=tar --prefix=ipa/ $(TARGET) | (cd dist && tar xf -) -- cgit