bdd tests: get rid of dependency on build path

BDD tests will now use whatever osm2pgsql they find in the PATH.
For testing against legacy tokenizer, use -DSERVER_MODULE_PATH
to point to the module. This will no longer work out of the box.
This commit is contained in:
Sarah Hoffmann
2024-07-30 11:38:40 +02:00
parent 67462e0953
commit 474aea61da
5 changed files with 17 additions and 19 deletions

View File

@@ -5,16 +5,18 @@
# Copyright (C) 2024 by the Nominatim developer community.
# For a full list of authors see the git log.
from pathlib import Path
import sys
from behave import *
sys.path.insert(1, str(Path(__file__, '..', '..', '..', 'src').resolve()))
from steps.geometry_factory import GeometryFactory
from steps.nominatim_environment import NominatimEnvironment
TEST_BASE_DIR = Path(__file__) / '..' / '..'
TEST_BASE_DIR = Path(__file__, '..', '..').resolve()
userconfig = {
'BUILDDIR' : (TEST_BASE_DIR / '..' / 'build').resolve(),
'REMOVE_TEMPLATE' : False,
'KEEP_TEST_DB' : False,
'DB_HOST' : None,
@@ -24,7 +26,7 @@ userconfig = {
'TEMPLATE_DB' : 'test_template_nominatim',
'TEST_DB' : 'test_nominatim',
'API_TEST_DB' : 'test_api_nominatim',
'API_TEST_FILE' : (TEST_BASE_DIR / 'testdb' / 'apidb-test-data.pbf').resolve(),
'API_TEST_FILE' : TEST_BASE_DIR / 'testdb' / 'apidb-test-data.pbf',
'SERVER_MODULE_PATH' : None,
'TOKENIZER' : None, # Test with a custom tokenizer
'STYLE' : 'extratags',