From e6c98e83db2c62385b7c9b47b214800ff71d1274 Mon Sep 17 00:00:00 2001 From: Raul Marin Date: Mon, 30 Oct 2017 17:37:47 +0100 Subject: [PATCH 1/5] Travis: Set Ubuntu precise as distribution --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ac2686d..840cae4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: c +dist: precise +sudo: required env: global: From bd2b1906431aa9021fe37223345166fe3a3c34d6 Mon Sep 17 00:00:00 2001 From: Raul Marin Date: Tue, 31 Oct 2017 09:58:43 +0100 Subject: [PATCH 2/5] Add PIP and NOSETESTS as variables to Makefile.global This makes it easier to change between pip/pip2 depending on the local environment --- Makefile.global | 2 ++ src/py/Makefile | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.global b/Makefile.global index da85992..140d486 100644 --- a/Makefile.global +++ b/Makefile.global @@ -4,3 +4,5 @@ PACKAGE = crankshaft EXTVERSION = $(shell grep default_version $(SELF_DIR)/src/pg/$(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/") RELEASE_VERSION ?= $(EXTVERSION) SED = sed +PIP = pip +NOSETESTS = nosetests diff --git a/src/py/Makefile b/src/py/Makefile index cc3c67e..cc22ed8 100644 --- a/src/py/Makefile +++ b/src/py/Makefile @@ -2,11 +2,11 @@ include ../../Makefile.global # Install the package locally for development install: - pip install --upgrade ./crankshaft + $(PIP) install --upgrade ./crankshaft # Test develpment install test: - nosetests crankshaft/test/ + $(NOSETESTS) crankshaft/test/ release: ../../release/$(EXTENSION).control $(SOURCES_DATA) mkdir -p ../../release/python/$(EXTVERSION) @@ -14,4 +14,4 @@ release: ../../release/$(EXTENSION).control $(SOURCES_DATA) $(SED) -i -r 's/version='"'"'[0-9]+\.[0-9]+\.[0-9]+'"'"'/version='"'"'$(EXTVERSION)'"'"'/g' ../../release/python/$(EXTVERSION)/$(PACKAGE)/setup.py deploy: - pip install $(RUN_OPTIONS) --upgrade ../../release/python/$(RELEASE_VERSION)/$(PACKAGE) + $(PIP) install $(RUN_OPTIONS) --upgrade ../../release/python/$(RELEASE_VERSION)/$(PACKAGE) From 5b30783c0477b01340d27e7eefb80f8cd09987e2 Mon Sep 17 00:00:00 2001 From: Raul Marin Date: Tue, 31 Oct 2017 10:03:29 +0100 Subject: [PATCH 3/5] PG regress: Order the tests Avoids an issue where some tests were run before the setup --- src/pg/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pg/Makefile b/src/pg/Makefile index 6775aad..c6fe484 100644 --- a/src/pg/Makefile +++ b/src/pg/Makefile @@ -25,7 +25,7 @@ $(DATA): $(SOURCES_DATA) $(SED) $(REPLACEMENTS) $(SOURCES_DATA_DIR)/*.sql > $@ TEST_DIR = test -REGRESS = $(notdir $(basename $(wildcard $(TEST_DIR)/sql/*test.sql))) +REGRESS = $(sort $(notdir $(basename $(wildcard $(TEST_DIR)/sql/*test.sql)))) REGRESS_OPTS = --inputdir='$(TEST_DIR)' --outputdir='$(TEST_DIR)' PG_CONFIG = pg_config From 1dc93284f83cbc5b704120c16bfa26e3200a9ecb Mon Sep 17 00:00:00 2001 From: Raul Marin Date: Tue, 31 Oct 2017 10:04:04 +0100 Subject: [PATCH 4/5] PG test: Make the extension tests version agnostic --- src/pg/test/expected/01_install_test.out | 2 +- src/pg/test/sql/01_install_test.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pg/test/expected/01_install_test.out b/src/pg/test/expected/01_install_test.out index c8a763e..79ff047 100644 --- a/src/pg/test/expected/01_install_test.out +++ b/src/pg/test/expected/01_install_test.out @@ -1,6 +1,6 @@ -- Install dependencies CREATE EXTENSION plpythonu; -CREATE EXTENSION postgis VERSION '2.2.2'; +CREATE EXTENSION postgis; -- Create role publicuser if it does not exist DO $$ diff --git a/src/pg/test/sql/01_install_test.sql b/src/pg/test/sql/01_install_test.sql index c90ea59..98d7db4 100644 --- a/src/pg/test/sql/01_install_test.sql +++ b/src/pg/test/sql/01_install_test.sql @@ -1,6 +1,6 @@ -- Install dependencies CREATE EXTENSION plpythonu; -CREATE EXTENSION postgis VERSION '2.2.2'; +CREATE EXTENSION postgis; -- Create role publicuser if it does not exist DO From a146848a79d8315526663ffda8c976de9492f3e0 Mon Sep 17 00:00:00 2001 From: Raul Marin Date: Tue, 31 Oct 2017 11:01:36 +0100 Subject: [PATCH 5/5] Travis: Use postgresql 9.5.2-3 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 840cae4..e3d7a6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,9 +44,9 @@ before_install: - sudo apt-get -y remove --purge postgis-2.2 - sudo apt-get -y autoremove - - sudo apt-get -y install postgresql-9.5=9.5.2-3cdb2 - - sudo apt-get -y install postgresql-server-dev-9.5=9.5.2-3cdb2 - - sudo apt-get -y install postgresql-plpython-9.5=9.5.2-3cdb2 + - sudo apt-get -y install postgresql-9.5=9.5.2-3cdb3 + - sudo apt-get -y install postgresql-server-dev-9.5=9.5.2-3cdb3 + - sudo apt-get -y install postgresql-plpython-9.5=9.5.2-3cdb3 - sudo apt-get -y install postgresql-9.5-postgis-scripts=2.2.2.0-cdb2 - sudo apt-get -y install postgresql-9.5-postgis-2.2=2.2.2.0-cdb2