From 36bf5f14b3a19bc06c9c3892cb2b73a49d315b1f Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Mon, 21 Dec 2015 13:09:46 +0100 Subject: [PATCH] update Makefile/README for new go system tests --- Makefile | 6 ++++-- README.md | 26 ++++++++++---------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 3e50c9d..f1311c4 100644 --- a/Makefile +++ b/Makefile @@ -34,11 +34,13 @@ clean: rm -f imposm3 (cd test && make clean) -test: test-unit test-system +test: imposm3 + $(GO) test ./... -i + $(GO) test ./... test-unit: imposm3 $(GO) test ./... -i - $(GO) test ./... + $(GO) test `$(GO) list ./... | grep -v 'imposm3/test'` test-system: imposm3 (cd test && make test) diff --git a/README.md b/README.md index 633ae2e..03a3dd2 100644 --- a/README.md +++ b/README.md @@ -250,29 +250,23 @@ The GEOS package is released as LGPL3 and is linked dynamically. See LICENSE.bin #### Unit tests #### - go test imposm3/... +To run all unit tests: + + make test-unit + +Or: + + godep go test ./... #### System tests #### There are system test that import and update OSM data and verify the database content. - -##### Dependencies ##### - -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. +You need `osmosis` to create the test PBF files. +There is a Makefile that creates all test files if necessary and then runs the test itself. make test 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.