[Merge] ~chris.macnaughton/ubuntu/+source/python-sqlalchemy-utils:master into ~ubuntu-server-dev/ubuntu/+source/python-sqlalchemy-utils:master

James Page james.page at ubuntu.com
Wed Jul 1 08:50:39 UTC 2020


Review: Needs Fixing



Diff comments:

> diff --git a/debian/changelog b/debian/changelog
> index 05518a1..927f74d 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -1,3 +1,11 @@
> +python-sqlalchemy-utils (0.36.1-0ubuntu3) UNRELEASED; urgency=medium
> +
> +  * d/rules: Do tests in packaging.
> +  * d/t/control: Configure functional tests.
> +  * d/t/python-sqlalchemy-utils: Setup and run functional tests.

Might be nice to have a top level line summarising why we are making these changes - I assume its for the MIR?

> +
> + -- Chris MacNaughton <chris.macnaughton at canonical.com>  Wed, 24 Jun 2020 12:57:10 +0000
> +
>  python-sqlalchemy-utils (0.36.1-0ubuntu1) focal; urgency=medium
>  
>    * New upstream release.
> diff --git a/debian/rules b/debian/rules
> index 870a3f3..9f0a879 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -8,13 +8,20 @@ export PYBUILD_NAME=sqlalchemy-utils
>  %:
>  	dh $@ --buildsystem=pybuild --with python3,sphinxdoc
>  
> -override_dh_auto_test:
> +#override_dh_auto_build:
> +#	echo "Do nothing..."

Please drop the lines above - I'm a bit of a -1 on commented out stuff in general

> +
> +override_dh_auto_install:
> +	for i in $(PYTHON3S) ; do \
> +		python$$i setup.py install -f --install-layout=deb --root=$(CURDIR)/debian/tmp; \
> +	done
>  ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
> -	echo "Do not run tests right now:"
> -	echo "need to setup mysql and postgres before running them"
> -	echo "and set SQLALCHEMY_UTILS_TEST_DB SQLALCHEMY_UTILS_TEST_POSTGRESQL_USER SQLALCHEMY_UTILS_TEST_MYSQL_USER"
> +	PYTHONPATH=$(CURDIR)/debian/tmp pkgos-dh_auto_test --no-py2
>  endif
>  
> +override_dh_auto_test:
> +	echo "Do nothing..."
> +
>  override_dh_sphinxdoc:
>  	PYTHONPATH=. python3 -m sphinx -b html docs debian/python-sqlalchemy-utils-doc/usr/share/doc/python-sqlalchemy-utils-doc/html
>  	dh_sphinxdoc
> diff --git a/debian/tests/python-sqlalchemy-utils b/debian/tests/python-sqlalchemy-utils
> new file mode 100755
> index 0000000..bf35edf
> --- /dev/null
> +++ b/debian/tests/python-sqlalchemy-utils
> @@ -0,0 +1,22 @@
> +#!/bin/bash
> +#---------------------
> +# Testing sqlalchemy-utils
> +#---------------------
> +ret=0
> +
> +sed  -i 's/local\s\+all\s\+postgres\s\+peer/local all postgres trust\nhost all postgres 127.0.0.1\/32 trust/' /etc/postgresql/*/main/pg_hba.conf
> +systemctl restart postgresql
> +psql -c 'drop database sqlalchemy_utils_test;' -U postgre
> +mysql -e 'drop database sqlalchemy_utils_test;'
> +
> +psql -c 'create database sqlalchemy_utils_test;' -U postgres
> +psql -c 'create extension hstore;' -d sqlalchemy_utils_test -U postgres
> +mysql -e 'create database sqlalchemy_utils_test;'
> +dpkg-reconfigure -f noninteractive tzdata

That does this step achieve?

> +set -e
> +
> +# SQLALCHEMY_UTILS_TEST_DB=sqlalchemy_test_db
> +# SQLALCHEMY_UTILS_TEST_POSTGRESQL_USER=postgres
> +# SQLALCHEMY_UTILS_TEST_MYSQL_USER=user
> +
> +pytest-3 sqlalchemy_utils tests


-- 
https://code.launchpad.net/~chris.macnaughton/ubuntu/+source/python-sqlalchemy-utils/+git/python-sqlalchemy-utils/+merge/386651
Your team Ubuntu Server Developers is subscribed to branch ~ubuntu-server-dev/ubuntu/+source/python-sqlalchemy-utils:master.



More information about the Ubuntu-reviews mailing list