X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/475108b937ac367a698de06035da17976682a4b3..521d6294993f8d8d46d93d514c08556d0c924786:/tests/steps/osm2pgsql_setup.py?ds=sidebyside diff --git a/tests/steps/osm2pgsql_setup.py b/tests/steps/osm2pgsql_setup.py index 759ca93d..eaa14573 100644 --- a/tests/steps/osm2pgsql_setup.py +++ b/tests/steps/osm2pgsql_setup.py @@ -140,7 +140,7 @@ def osm2pgsql_load_place(step): world.osm2pgsql.sort(cmp=_sort_xml_entries) # create a OSM file in /tmp - with tempfile.NamedTemporaryFile(dir='/tmp', delete=False) as fd: + with tempfile.NamedTemporaryFile(dir='/tmp', suffix='.osm', delete=False) as fd: fname = fd.name fd.write("\n") fd.write('\n') @@ -154,7 +154,7 @@ def osm2pgsql_load_place(step): logger.debug( "Filename: %s" % fname) cmd = [os.path.join(world.config.source_dir, 'utils', 'setup.php')] - cmd.extend(['--osm-file', fname, '--import-data']) + cmd.extend(['--osm-file', fname, '--import-data','--osm2pgsql-cache', '300']) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (outp, outerr) = proc.communicate() assert (proc.returncode == 0), "OSM data import failed:\n%s\n%s\n" % (outp, outerr) @@ -188,7 +188,7 @@ def osm2pgsql_update_place(step): world.run_nominatim_script('setup', 'index', 'index-noanalyse') world.run_nominatim_script('setup', 'create-functions', 'create-partition-functions', 'enable-diff-updates') - with tempfile.NamedTemporaryFile(dir='/tmp', delete=False) as fd: + with tempfile.NamedTemporaryFile(dir='/tmp', suffix='.osc', delete=False) as fd: fname = fd.name fd.write("\n") fd.write('\n')