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
This commit is contained in:
Petr Viktorin
2013-05-21 13:40:27 +02:00
committed by Martin Kosek
parent 6d66e826c1
commit c60142efda
105 changed files with 237 additions and 93 deletions

View File

@@ -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 -)