update Makefile/README for new go system tests

master
Oliver Tonnhofer 2015-12-21 13:09:46 +01:00
parent 7bf29b60f7
commit 36bf5f14b3
2 changed files with 14 additions and 18 deletions

View File

@ -34,11 +34,13 @@ clean:
rm -f imposm3 rm -f imposm3
(cd test && make clean) (cd test && make clean)
test: test-unit test-system test: imposm3
$(GO) test ./... -i
$(GO) test ./...
test-unit: imposm3 test-unit: imposm3
$(GO) test ./... -i $(GO) test ./... -i
$(GO) test ./... $(GO) test `$(GO) list ./... | grep -v 'imposm3/test'`
test-system: imposm3 test-system: imposm3
(cd test && make test) (cd test && make test)

View File

@ -250,29 +250,23 @@ The GEOS package is released as LGPL3 and is linked dynamically. See LICENSE.bin
#### Unit tests #### #### Unit tests ####
go test imposm3/... To run all unit tests:
make test-unit
Or:
godep go test ./...
#### System tests #### #### System tests ####
There are system test that import and update OSM data and verify the database content. There are system test that import and update OSM data and verify the database content.
You need `osmosis` to create the test PBF files.
##### Dependencies ##### There is a Makefile that creates all test files if necessary and then runs the test itself.
These tests are written in Python and requires `nose`, `shapely` and `psycopg2`.
On a recent Ubuntu can install the following packages for that: `python-nose python-shapely python-psycopg2`
Or you can [install a Python virtualenv](https://virtualenv.pypa.io/en/latest/installation.html):
virtualenv imposm3test
source imposm3test/bin/activate
pip install nose shapely psycopg2
You also need `osmosis` to create test PBF files.
There is a Makefile that (re)builds `imposm3` and creates all test files if necessary and then runs the test itself.
make test make test
Call `make test-system` to skip the unit tests. Call `make test-system` to skip the unit tests.
WARNING: It uses your local PostgeSQL database (`import` schema). Change the database with the standard `PGDATABASE`, `PGHOST`, etc. environment variables. WARNING: It uses your local PostgeSQL database (`imposm3testimport`, `imposm3testproduction` and `imposm3testbackup` schema). Change the database with the standard `PGDATABASE`, `PGHOST`, etc. environment variables.