1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
include /usr/share/openstack-pkg-tools/pkgos.make
LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
BUILD_DATE = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
export http_proxy=127.0.0.1:9
export https_proxy=127.0.0.1:9
export HTTP_PROXY=127.0.0.1:9
export HTTPS_PROXY=127.0.0.1:9
%:
dh $@ --buildsystem=python_distutils --with python3,sphinxdoc
override_dh_auto_clean:
rm -rf .testrepository
override_dh_auto_build:
echo "Do nothing..."
override_dh_auto_install:
pkgos-dh_auto_install --no-py2
rm -rf $(CURDIR)/debian/python*/usr/etc
mkdir -p $(CURDIR)/debian/tempest/etc/tempest
PYTHONPATH=$(CURDIR)/debian/python3-tempest/usr/lib/python3/dist-packages oslo-config-generator --output-file $(CURDIR)/debian/tempest/etc/tempest/tempest.conf \
--wrap-width 140 \
--namespace tempest.config \
--namespace oslo.concurrency \
--namespace oslo.log
install -D -m 0664 etc/logging.conf.sample $(CURDIR)/debian/tempest/etc/tempest/logging.conf
install -D -m 0664 etc/accounts.yaml.sample $(CURDIR)/debian/tempest/etc/tempest/accounts.yaml
install -D -m 0664 etc/whitelist.yaml $(CURDIR)/debian/tempest/etc/tempest/whitelist.yaml
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf DEFAULT verbose false
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf DEFAULT log_file tempest.log
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf DEFAULT log_dir /var/log
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf DEFAULT log_file tempest.log
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf oslo_concurrency lock_path /var/lock
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf auth admin_tenant_name admin
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf auth admin_username admin
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf auth admin_domain_name Default
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf compute fixed_network_name demo-net
pkgos-fix-config-default $(CURDIR)/debian/tempest/etc/tempest/tempest.conf identity auth_version v3
mkdir -p $(CURDIR)/debian/tempest/var/lib/tempest
ln -s /usr/lib/python3/dist-packages/tempest $(CURDIR)/debian/tempest/var/lib/tempest/tempest
cp .stestr.conf $(CURDIR)/debian/tempest/var/lib/tempest
install -D -m 775 debian/tempest_shell_wrapper $(CURDIR)/debian/tempest/usr/bin/tempest_debian_shell_wrapper
rm -fr $(CURDIR)/debian/tempest/usr/etc
override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
for pyvers in $(PYTHON3S) ; do \
rm -rf .stestr ; \
PYTHONPATH=$(CURDIR)/debian/python-tempest/usr/lib/python3/dist-packages PYTHON=python$$pyvers stestr --test-path ./tempest/tests run | subunit2pyunit ; \
stestr slowest ; \
rm -rf .stestr ; \
done
endif
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
PYTHONPATH=. python3 -m sphinx -D html_last_updated_fmt="$(BUILD_DATE)" -b html doc/source $(CURDIR)/debian/tempest/usr/share/doc/tempest/html
dh_sphinxdoc
endif
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
|