[Tile-serving] [osm2pgsql-dev/osm2pgsql] Add script for style testing (PR #2436)
Sarah Hoffmann
notifications at github.com
Wed Dec 3 11:29:02 UTC 2025
@lonvia commented on this pull request.
> + context.import_data = None
+ cmdline.extend(('-r', 'opl', '-'))
+ else:
+ assert context.import_file is not None, "No input data given."
+ cmdline.append(str(context.import_file))
+ context.import_file = None
+ data_stdin = None
+
+ proc = Popen(cmdline, cwd=str(context.workdir),
+ stdin=PIPE, stdout=PIPE, stderr=PIPE)
+
+ outdata = proc.communicate(input=data_stdin)
+ context.osm2pgsql_cmdline = ' '.join(cmdline)
+ context.osm2pgsql_outdata = [d.decode('utf-8').replace('\\n', '\n') for d in outdata]
+ context.osm2pgsql_returncode = proc.returncode
+ context.osm2pgsql_params = {'-d': context.user_args.test_db}
This resets all parameters. This is admittedly also a deviation from the current behaviour. If you want to call the execution step again, you need to redo all steps that influence the osm2pgsql command line. We had exactly one test where this was an issue an it was doing the same update twice. So reuse looks to be a rare case and I'd rather err on the side of having to spell things out.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2436#discussion_r2584745294
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/pull/2436/review/3534611730 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20251203/136e1463/attachment.htm>
More information about the Tile-serving
mailing list