]> git.openstreetmap.org Git - nominatim.git/commitdiff
change default nominatim path for tests to obvious '..'
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 7 Sep 2014 18:11:21 +0000 (20:11 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 7 Sep 2014 18:11:21 +0000 (20:11 +0200)
Makefile.am
tests/README.md
tests/steps/terrain.py

index 3f57590c331becf83530d69fb8772946dde209bf..37fa29c9d3d420146947541f19bdfa1fae2f97a1 100644 (file)
@@ -10,18 +10,18 @@ install:
        @echo Nominatim needs to be executed directly from this directory. No install necessary.
 
 test:
        @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:
 
 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:
 
 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:
 
 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:
 
 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
 
 .PHONY: test test-fast test-db test-db-fast test-api
index 2e8cfa22cca655144996b9447c20141c96a4dba4..9b053e157560b4988cd3c369383533e4cd799555 100644 (file)
@@ -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.
                                 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
  * `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
index 52b7e31e4e3d6f02ce7f7178e23717e327925c25..cfd243db4cada7443f5b1ee031e09cd2e0d17f97 100644 (file)
@@ -23,7 +23,7 @@ class NominatimConfig:
             logging.basicConfig(level=loglevel)
         # Nominatim test setup
         self.base_url = os.environ.get('NOMINATIM_SERVER', 'http://localhost/nominatim')
             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')
         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')