Skip to content

Commit 53caaa6

Browse files
committed
forward environment variables to osm2pgsql in test
Windows needs external setup to function properly.
1 parent af76f19 commit 53caaa6

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

scripts/osm2pgsql-test-style

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -500,17 +500,8 @@ def execute_osm2pgsql(context, output):
500500
context.import_file = None
501501
data_stdin = None
502502

503-
env = {}
504-
if context.user_args.lua_path:
505-
env['LUA_PATH'] = context.user_args.lua_path
506-
if context.user_args.themepark_path:
507-
env['THEMEPARK_PATH'] = context.user_args.themepark_path
508-
for k in ['PGPORT', 'PGPASSWORD', 'PGUSER', 'PGHOST']:
509-
if k in os.environ:
510-
env[k] = os.environ[k]
511-
512503
proc = Popen(cmdline, cwd=str(context.workdir),
513-
stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env)
504+
stdin=PIPE, stdout=PIPE, stderr=PIPE)
514505

515506
outdata = proc.communicate(input=data_stdin)
516507
context.osm2pgsql_cmdline = ' '.join(cmdline)
@@ -793,10 +784,6 @@ def get_parser():
793784
help='(optional) directory to search for test data')
794785
parser.add_argument('--style-data-dir', type=Path,
795786
help='(optional) directory to search for style files')
796-
parser.add_argument('--lua-path',
797-
help='Additional paths to take into account for finding lua modules')
798-
parser.add_argument('--themepark-path',
799-
help='Additional paths to take into account for finding themepark themes')
800787
parser.add_argument('--test-db', default='osm2pgsql-test',
801788
help='Name of database to use for testing (default: osm2pgsql-test)')
802789
parser.add_argument('--template-test-db', default='osm2pgsql-test-template',

0 commit comments

Comments
 (0)