]> review.fuel-infra Code Review - openstack-build/neutron-lbaas-build.git/commitdiff
Enables unit tests.
authorThomas Goirand <zigo@debian.org>
Wed, 18 Mar 2015 22:15:24 +0000 (23:15 +0100)
committerThomas Goirand <zigo@debian.org>
Wed, 18 Mar 2015 22:15:24 +0000 (23:15 +0100)
Rewritten-From: c4581f0dccf52a6bc5af62d61cb64c71b3d72046

xenial/debian/rules

index 5f6b70020d4a886c3641c801adf541680226526d..d2ed0f79998e2ba2cc4c3e82dfdcb81b48476cfa 100755 (executable)
@@ -14,23 +14,21 @@ override_dh_install:
        dh_install -O--buildsystem=python_distutils
        install -D -m 0644 etc/neutron_lbaas.conf $(CURDIR)/debian/neutron-lbass/etc/neutron/neutron_lbaas.conf
 
-# Unit tests are disabled, because it expects neutron.conf
-# in /usr/lib/python2.7/dist-packages/etc/neutron.conf
-#override_dh_auto_test:
-#ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
-#       @echo "===> Running tests"
-#       set -e ; set -x ; for i in 2.7 ; do \
-#               PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
-#               echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
-#               rm -rf .testrepository ; \
-#               testr-python$$PYMAJOR init ; \
-#               TEMP_REZ=`mktemp -t` ; \
-#               PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit neutron_lbaas.tests.unit | tee $$TEMP_REZ | subunit2pyunit ; \
-#               cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
-#               rm -f $$TEMP_REZ ; \
-#               testr-python$$PYMAJOR slowest ; \
-#       done
-#endif
+override_dh_auto_test:
+ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+       @echo "===> Running tests"
+       set -e ; set -x ; for i in 2.7 ; do \
+               PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
+               echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
+               rm -rf .testrepository ; \
+               testr-python$$PYMAJOR init ; \
+               TEMP_REZ=`mktemp -t` ; \
+               PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit neutron_lbaas.tests.unit | tee $$TEMP_REZ | subunit2pyunit ; \
+               cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
+               rm -f $$TEMP_REZ ; \
+               testr-python$$PYMAJOR slowest ; \
+       done
+endif
 
 override_dh_auto_clean:
        dh_auto_clean