def setup_api_db(self, context):
self.write_nominatim_config(self.api_test_db)
+ def setup_unknown_db(self, context):
+ self.write_nominatim_config('UNKNOWN_DATABASE_NAME')
+
def setup_db(self, context):
self.setup_template_db()
self.write_nominatim_config(self.test_db)
self.run_nominatim_script('update', *args, **kwargs)
def run_nominatim_script(self, script, *args, **kwargs):
- cmd = [os.path.join(self.build_dir, 'utils', '%s.php' % script)]
+ cmd = ['/usr/bin/env', 'php', '-Cq']
+ cmd.append(os.path.join(self.build_dir, 'utils', '%s.php' % script))
cmd.extend(['--%s' % x for x in args])
for k, v in kwargs.items():
cmd.extend(('--' + k.replace('_', '-'), str(v)))
context.nominatim.setup_db(context)
elif 'APIDB' in context.tags:
context.nominatim.setup_api_db(context)
+ elif 'UNKNOWNDB' in context.tags:
+ context.nominatim.setup_unknown_db(context)
context.scene = None
def after_scenario(context, scenario):