Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Sep 28, 2016
2 parents 444a5b3 + 7ee2eaf commit 00d6f08
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
14 changes: 9 additions & 5 deletions .travis.yml
@@ -1,3 +1,7 @@
sudo: required

dist: trusty

language: python

python:
Expand All @@ -10,6 +14,7 @@ env:
- BERKELEYDB_LIBDIR=/usr/lib/x86_64-linux-gnu BERKELEYDB_INCDIR=/usr/include

before_install:
- chmod o+rx /home/travis
- sudo sed -i '/plugin_directory/d' /etc/boto.cfg
- ssh-keygen -t rsa -C your_email@youremail.com -P '' -f ~/.ssh/id_rsa
- cat /home/travis/.ssh/id_rsa.pub >> /home/travis/.ssh/authorized_keys
Expand All @@ -23,13 +28,12 @@ before_install:

- sudo rm -f /etc/apt/sources.list.d/pgdg-source.list
- sudo rm -rf /usr/local
- echo 'yes' | sudo add-apt-repository ppa:stephane-brunner/precise
- echo 'yes' | sudo add-apt-repository ppa:mapnik/v2.2.0
- echo 'yes' | sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository --yes ppa:stephane-brunner/trusty-gis
- sudo apt-get update
- sudo apt-get install -y --force-yes libstdc++-4.9-dev libc6 libmapnik-dev apache2 cgi-mapserver deploy libdb-dev optipng postgresql-9.1-postgis-2.0=2.0.3-2~precise4 postgis=2.0.3-2~precise4
- sudo apt-get install -y --force-yes libstdc++-4.8-dev libc6 libmapnik-dev apache2 libapache2-mod-fcgid cgi-mapserver deploy libdb-dev optipng postgresql-9.3-postgis-2.1

- sudo -u postgres tilecloud_chain/tests/create_test_data.sh
- sudo a2enmod fcgid
- sudo cp tilecloud_chain/tests/apache.conf /etc/apache2/sites-enabled/apache.conf
- sudo apache2ctl graceful

Expand All @@ -56,7 +60,7 @@ script:
- python setup.py --long-description > PYPI.rst
- vvv-validate-rst PYPI.rst
- python setup.py nosetests --nocapture --nologcapture --stop --attr '!'nopy`echo $TRAVIS_PYTHON_VERSION | awk -F . '{{print $1}}'`
- if [ ${TRAVIS_PULL_REQUEST} != "false" ] ; then git diff --check ${TRAVIS_BRANCH} -- ; fi
- git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '`

after_failure:
- python setup.py nosetests --logging-filter=tilecloud,tilecloud_chain --attr '!'nopy`echo $TRAVIS_PYTHON_VERSION | awk -F . '{{print $1}}'`
Expand Down
3 changes: 2 additions & 1 deletion tilecloud_chain/tests/apache.conf
@@ -1,5 +1,6 @@
ScriptAlias /mapserv /usr/lib/cgi-bin/mapserv
<Location /mapserv>
SetHandler cgi-script
SetHandler fcgid-script
SetEnv MS_MAPFILE /home/travis/build/sbrunner/tilecloud-chain/tilecloud_chain/tests/mapfile/mapfile.map
Require all granted
</Location>
2 changes: 2 additions & 0 deletions tilecloud_chain/tests/test_multihost.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

import os
import re
import shutil
from subprocess import Popen, PIPE

Expand Down Expand Up @@ -59,6 +60,7 @@ def test_code(self):
'--disable-geodata --disable-database --disable-fillqueue --disable-tilesgen --host localhost',
main_func=amazon.main)
self.assertEqual(out, '==== Sync and build code ====\n')
err = re.sub(re.escape("b\"AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message\\n\""), "", err).strip() # noqa
self.assertEqual(err, '')
with open('/tmp/tests/test/tilecloud_chain/tests/tilegeneration/hooks/post-restore-database', 'r') as f:
self.assert_result_equals(f.read(), "echo SUCCESS\n")
Expand Down

0 comments on commit 00d6f08

Please sign in to comment.