Sets /etc/ceilometer/{policy,sources}.json as conffile and remove handling from the...
[openstack-build/ceilometer-build.git] / xenial / debian / rules
index a3a99ccab6c553cfe308dfd106b04b582c714b37..e6df3bf7cce68f1d5e0d3d1df84a15f3b8eb01cc 100755 (executable)
@@ -11,15 +11,13 @@ export OSLO_PACKAGE_VERSION=$(VERSION)
 
 override_dh_clean:
        dh_clean
+       rm -rf .testrepository
        rm -rf ceilometer.egg-info
        rm -f debian/ceilometer-common.config debian/ceilometer-common.postinst debian/ceilometer-api.config debian/ceilometer-api.postinst
 
 override_dh_install:
        dh_install
        install -D -m 0644 $(CURDIR)/etc/ceilometer/ceilometer.conf.sample      $(CURDIR)/debian/ceilometer-common/usr/share/ceilometer-common/ceilometer.conf
-       install -D -m 0644 $(CURDIR)/etc/ceilometer/policy.json                 $(CURDIR)/debian/ceilometer-common/usr/share/ceilometer-common/policy.json
-       install -D -m 0644 $(CURDIR)/etc/ceilometer/sources.json                $(CURDIR)/debian/ceilometer-common/usr/share/ceilometer-common/sources.json
-       install -D -m 0644 $(CURDIR)/etc/ceilometer/pipeline.yaml               $(CURDIR)/debian/ceilometer-common/usr/share/ceilometer-common/pipeline.yaml
 
 override_dh_auto_build:
        dh_auto_build
@@ -36,10 +34,12 @@ override_dh_auto_clean:
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
-       set -e && TEMP_REZ=`mktemp -t` && \
-               bash -x ./setup-test-env.sh python setup.py testr --slowest  --testr-args='--subunit  --omit=test_bin.py  ' | tee $$TEMP_REZ | subunit2pyunit || true ; \
+       rm -rf .testrepository
+       testr init
+       set -e && \
+               TEMP_REZ=`mktemp -t` && \
+               bash -x ./setup-test-env.sh testr run --subunit 'tests\.(?!.*test_bin.*)' | tee $$TEMP_REZ | subunit2pyunit || true ; \
                cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats || true ; \
-               rm -f $$TEMP_REZ
-       #./run-tests.sh || true
-       #PYTHONPATH=. nosetests -P || true
+               rm -f $$TEMP_REZ ;
+       testr slowest
 endif