From b466940a19cdd60cf1d0b4438cfc499c8f207390 Mon Sep 17 00:00:00 2001 From: Luc-Edmond Gaspard Date: Wed, 18 Nov 2015 11:48:51 -0500 Subject: [PATCH] use the right character to separate the directories in the pathname for the current os --- test/helper.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/test/helper.py b/test/helper.py index 3361754..d89492e 100644 --- a/test/helper.py +++ b/test/helper.py @@ -2,6 +2,7 @@ import math import tempfile import shutil import subprocess +import os import psycopg2 import psycopg2.extras import json @@ -106,7 +107,8 @@ def imposm3_import(db_conf, pbf, mapping_file): try: print subprocess.check_output(( - "../imposm3 import -connection %s -read %s" + os.path.join("..", "imposm3") + + " import -connection %s -read %s" " -write" " -cachedir %s" " -diff" @@ -126,7 +128,8 @@ def imposm3_deploy(db_conf, mapping_file): try: print subprocess.check_output(( - "../imposm3 import -connection %s" + os.path.join("..", "imposm3") + + " import -connection %s" " -dbschema-import " + TEST_SCHEMA_IMPORT + " -dbschema-production " + TEST_SCHEMA_PRODUCTION + " -dbschema-backup " + TEST_SCHEMA_BACKUP + @@ -144,7 +147,8 @@ def imposm3_revert_deploy(db_conf, mapping_file): try: print subprocess.check_output(( - "../imposm3 import -connection %s" + os.path.join("..", "imposm3") + + " import -connection %s" " -dbschema-import " + TEST_SCHEMA_IMPORT + " -dbschema-production " + TEST_SCHEMA_PRODUCTION + " -dbschema-backup " + TEST_SCHEMA_BACKUP + @@ -162,7 +166,8 @@ def imposm3_remove_backups(db_conf, mapping_file): try: print subprocess.check_output(( - "../imposm3 import -connection %s" + os.path.join("..", "imposm3") + + " import -connection %s" " -dbschema-backup " + TEST_SCHEMA_BACKUP + " -removebackup" " -mapping %s ") % ( @@ -178,7 +183,8 @@ def imposm3_update(db_conf, osc, mapping_file): try: print subprocess.check_output(( - "../imposm3 diff -connection %s" + os.path.join("..", "imposm3") + + " diff -connection %s" " -cachedir %s" " -limitto clipping.geojson" " -dbschema-production " + TEST_SCHEMA_PRODUCTION + @@ -201,7 +207,8 @@ def cache_query(nodes='', ways='', relations='', deps='', full=''): if full: full = '-full' out = subprocess.check_output( - "../imposm3 query-cache -cachedir %s %s %s %s %s %s" % ( + os.path.join("..", "imposm3") + + " query-cache -cachedir %s %s %s %s %s %s" % ( tmpdir, nodes, ways, relations, deps, full), shell=True) print out