From f94ee6ad57489e75eeaa93a1e7a57a1834229d75 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 7 Sep 2014 20:11:21 +0200 Subject: [PATCH] change default nominatim path for tests to obvious '..' --- Makefile.am | 10 +++++----- tests/README.md | 4 ++++ tests/steps/terrain.py | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3f57590c..37fa29c9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,18 +10,18 @@ install: @echo Nominatim needs to be executed directly from this directory. No install necessary. test: - cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} NOMINATIM_DIR=.. lettuce -t -Fail -t -poldi-only + cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} lettuce -t -Fail -t -poldi-only test-fast: - cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} NOMINATIM_REUSE_TEMPLATE=1 NOMINATIM_DIR=.. lettuce -t -Fail -t -poldi-only + cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} NOMINATIM_REUSE_TEMPLATE=1 lettuce -t -Fail -t -poldi-only test-db: - cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} NOMINATIM_DIR=.. lettuce -t -Fail -t -poldi-only -t DB + cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} lettuce -t -Fail -t -poldi-only -t DB test-db-fast: - cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} NOMINATIM_REUSE_TEMPLATE=1 NOMINATIM_DIR=.. lettuce -t -Fail -t -poldi-only -t DB + cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} NOMINATIM_REUSE_TEMPLATE=1 lettuce -t -Fail -t -poldi-only -t DB test-api: - cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} NOMINATIM_DIR=.. lettuce -t -Fail -t -poldi-only features/api + cd tests; NOMINATIM_SERVER=${NOMINATIM_SERVER} lettuce -t -Fail -t -poldi-only features/api .PHONY: test test-fast test-db test-db-fast test-api diff --git a/tests/README.md b/tests/README.md index 2e8cfa22..9b053e15 100644 --- a/tests/README.md +++ b/tests/README.md @@ -40,6 +40,10 @@ The tests can be configured with a set of environment variables: the next run. This speeds up tests considerably but might lead to outdated errors for some changes in the database layout. + * `NOMINATIM_KEEP_SCENARIO_DB` - if defined, the test database will not be + dropped after a test is finished. Should + only be used if one single scenario is run, + otherwise the result is undefined. * `LOGLEVEL` - set to 'debug' to get more verbose output (only works properly when output to a logfile is configured) * `LOGFILE` - sends debug output to the given file diff --git a/tests/steps/terrain.py b/tests/steps/terrain.py index 52b7e31e..cfd243db 100644 --- a/tests/steps/terrain.py +++ b/tests/steps/terrain.py @@ -23,7 +23,7 @@ class NominatimConfig: logging.basicConfig(level=loglevel) # Nominatim test setup self.base_url = os.environ.get('NOMINATIM_SERVER', 'http://localhost/nominatim') - self.source_dir = os.path.abspath(os.environ.get('NOMINATIM_DIR', '../Nominatim')) + self.source_dir = os.path.abspath(os.environ.get('NOMINATIM_DIR', '..')) self.template_db = os.environ.get('TEMPLATE_DB', 'test_template_nominatim') self.test_db = os.environ.get('TEST_DB', 'test_nominatim') self.local_settings_file = os.environ.get('NOMINATIM_SETTINGS', '/tmp/nominatim_settings.php') -- 2.39.5