diff --git a/.travis.yml b/.travis.yml index 4bf1bf452..0a71a24f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ before_install: - echo 'yes' | sudo add-apt-repository ppa:stephane-brunner/precise - echo 'yes' | sudo add-apt-repository ppa:mapnik/v2.2.0 - sudo apt-get update -- sudo apt-get install -y libmapnik-dev python-mapnik postgresql-9.1-postgis apache2 cgi-mapserver deploy libdb-dev +- sudo apt-get install -y libmapnik-dev python-mapnik apache2 cgi-mapserver deploy libdb-dev - sudo -u postgres tilecloud_chain/tests/create_test_data.sh - sudo cp tilecloud_chain/tests/apache.conf /etc/apache2/sites-enabled/apache.conf - sudo apache2ctl graceful @@ -31,8 +31,8 @@ before_install: install: - pip install -U mapnik2==2.2.0 --use-mirrors -- python bootstrap.py --distribute -v 1.7.1 -- ./buildout/bin/buildout +- python bootstrap.py -v 1.7.1 +- ./buildout/bin/buildout script: - find tilecloud_chain -name \*.py | xargs ./buildout/bin/flake8 --max-line-length=120 diff --git a/buildout.cfg b/buildout.cfg index 46e078446..2413e6f5a 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -7,8 +7,6 @@ parts = eggs develop = . newest = false prefer-final = true -index = http://pypi.camptocamp.net/pypi -allow-hosts = pypi.camptocamp.net extensions = buildout.dumppickedversions versions = versions diff --git a/buildout/.gitignore b/buildout/.gitignore index 72e8ffc0d..d6b7ef32c 100644 --- a/buildout/.gitignore +++ b/buildout/.gitignore @@ -1 +1,2 @@ * +!.gitignore diff --git a/tilecloud_chain/tests/create_test_data.sh b/tilecloud_chain/tests/create_test_data.sh index b647f41b6..0c5b69b66 100755 --- a/tilecloud_chain/tests/create_test_data.sh +++ b/tilecloud_chain/tests/create_test_data.sh @@ -1,7 +1,5 @@ createdb -E UTF8 -T template0 tests -psql -q -d tests -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql -psql -q -d tests -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql -#psql -q -d tests -c "CREATE EXTENSION postgis" +psql -q -d tests -c "CREATE EXTENSION postgis" psql -q -d tests -c "ALTER USER postgres WITH PASSWORD 'postgres';" psql -q -d tests -c "CREATE SCHEMA tests;" diff --git a/tilecloud_chain/tests/test_expiretiles.py b/tilecloud_chain/tests/test_expiretiles.py index 51faf556a..031474b17 100644 --- a/tilecloud_chain/tests/test_expiretiles.py +++ b/tilecloud_chain/tests/test_expiretiles.py @@ -37,19 +37,19 @@ def tearDownClass(self): def test_expire_tiles(self, l): GEOM = ( 'MULTIPOLYGON(((' - '537956.742292376 151362.137871755,' - '537957.826834588 151467.196630838,' - '537958.911357866 151572.253567258,' - '537959.995862209 151677.30868105,' - '538065.385383791 151676.221647663,' - '538064.302719542 151571.166514771,' - '538169.694100363 151570.08130827,' - '538168.61325734 151465.024333684,' - '538274.006497397 151463.940954131,' - '538272.927475664 151358.882137846,' - '538167.532395446 151359.965536437,' - '538062.137334338 151361.05078107,' - '537956.742292376 151362.137871755)))' + '537956.702147466 151362.192371583,' + '537957.786689681 151467.251130455,' + '537958.871212961 151572.30806667,' + '537959.955717307 151677.363180256,' + '538065.345238682 151676.276146866,' + '538064.26257443 151571.22101418,' + '538169.653955045 151570.135807676,' + '538168.573112019 151465.078833297,' + '538273.96635187 151463.995453742,' + '538272.887330133 151358.936637663,' + '538167.492250122 151360.020036253,' + '538062.09718922 151361.105280892,' + '537956.702147466 151362.192371583)))' ) self.assert_cmd_equals( diff --git a/tilecloud_chain/tests/test_generate.py b/tilecloud_chain/tests/test_generate.py index 513eb415f..6562f30a6 100644 --- a/tilecloud_chain/tests/test_generate.py +++ b/tilecloud_chain/tests/test_generate.py @@ -787,13 +787,13 @@ def test_time(self, l): self.assert_cmd_equals( cmd='./buildout/bin/generate_tiles %s -c tilegeneration/test.yaml --time 2 -l polygon' % d, main_func=generate.main, - expected="""size: 776 -size: 860 -size: 860 -size: 860 + expected="""size: 770 +size: 862 +size: 862 +size: 862 time: [0-9]* -size: 860 -size: 860 +size: 862 +size: 862 """, regex=True, empty_err=True) @@ -806,13 +806,13 @@ def test_time_layer_bbox(self, l): self.assert_cmd_equals( cmd='./buildout/bin/generate_tiles %s -c tilegeneration/test.yaml --time 2 -l all' % d, main_func=generate.main, - expected="""size: 854 -size: 854 -size: 854 -size: 854 + expected="""size: 1010 +size: 1010 +size: 1010 +size: 1010 time: [0-9]* -size: 854 -size: 854 +size: 1010 +size: 1010 """, regex=True, empty_err=True) diff --git a/tilecloud_chain/tests/test_multihost.py b/tilecloud_chain/tests/test_multihost.py index f671ef4d3..2305995e8 100644 --- a/tilecloud_chain/tests/test_multihost.py +++ b/tilecloud_chain/tests/test_multihost.py @@ -116,13 +116,13 @@ def test_time_multihost(self): expected="""==== Sync and build code ==== ==== Time results ==== A tile is generated in: [0-9\.]* \[ms\] -Then mean generated tile size: 0.780 \[kb\] +Then mean generated tile size: 1.144 \[kb\] config: cost: tileonly_generation_time: [0-9\.]* tile_generation_time: [0-9\.]* metatile_generation_time: 0 - tile_size: 0.780 + tile_size: 1.144 """, regex=True) @attr(time_near=True)