Skip to content

Commit

Permalink
Merge pull request #189 from sbrunner/travis
Browse files Browse the repository at this point in the history
Now travis dirrectly include postgis
  • Loading branch information
sbrunner committed Nov 28, 2013
2 parents 4e8d6d4 + 060aba5 commit 77e7ebf
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions buildout/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*
!.gitignore
4 changes: 1 addition & 3 deletions tilecloud_chain/tests/create_test_data.sh
Original file line number Diff line number Diff line change
@@ -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;"
Expand Down
26 changes: 13 additions & 13 deletions tilecloud_chain/tests/test_expiretiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
24 changes: 12 additions & 12 deletions tilecloud_chain/tests/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tilecloud_chain/tests/test_multihost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 77e7ebf

Please sign in to comment.