From 860e7fd7b81f956b54b25224efbd69ff9b1d1cc7 Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Mon, 1 Aug 2016 17:29:50 +0200 Subject: Update script for debian package creation. Change-Id: I0860633b9dc1aedd89e0272b92cb17022d35d01c --- keystone-moon/debian/rules | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100755 keystone-moon/debian/rules (limited to 'keystone-moon/debian/rules') diff --git a/keystone-moon/debian/rules b/keystone-moon/debian/rules new file mode 100755 index 00000000..9aaf182a --- /dev/null +++ b/keystone-moon/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +#export DH_VERBOSE=1 + +# auth_token middleware now requires access to HOME, otherwise +# test suite cause FTBFS. See (LP: #1031022) +export HOME="$(CURDIR)/debian/tests/" + +# This is to avoid git clone of keystoneclient when running unit tests. +# See https://review.openstack.org/122768/ +export KSCTEST_PATH=/usr/lib/python2.7/dist-packages/keystoneclient + +include /usr/share/openstack-pkg-tools/pkgos.make + +export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d' ' -f2 | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' | head -n 1) + +%: + dh $@ --buildsystem=python_distutils --with python2,sphinxdoc,systemd + +override_dh_auto_test: +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) + @echo "===> Running tests" + mkdir -p $(CURDIR)/keystone/tests/tmp + patch -p1 -R 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 'keystone\.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 + patch -p1