From c037fcba36c33fa89edb207d2f1fc3fa0c321018 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 25 Jan 2016 16:57:32 -0800 Subject: [PATCH] fix shapeindex tests - closes #3252 --- localize.sh | 1 + test/unit/datasource/shapeindex.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/localize.sh b/localize.sh index d24bdcb40..4b69c2f6b 100755 --- a/localize.sh +++ b/localize.sh @@ -10,6 +10,7 @@ fi export PATH=$(pwd)/utils/mapnik-render/:${PATH} export PATH=$(pwd)/utils/mapnik-index/:${PATH} export PATH=$(pwd)/utils/mapnik-config/:${PATH} +export PATH=$(pwd)/utils/shapeindex/:${PATH} # mapnik-settings.env is an optional file to store # environment variables that should be used before diff --git a/test/unit/datasource/shapeindex.cpp b/test/unit/datasource/shapeindex.cpp index 79ac9a9e6..636713feb 100644 --- a/test/unit/datasource/shapeindex.cpp +++ b/test/unit/datasource/shapeindex.cpp @@ -66,8 +66,8 @@ int create_shapefile_index(std::string const& filename, bool index_parts, bool s cmd += std::string("DYLD_LIBRARY_PATH=") + std::getenv("DYLD_LIBRARY_PATH") + " "; } - cmd += "shapeindex"; - if (index_parts) cmd+= " --index-parts "; + cmd += "shapeindex "; + if (index_parts) cmd+= "--index-parts "; cmd += filename; if (silent) { @@ -104,7 +104,7 @@ TEST_CASE("shapeindex") // count features std::size_t feature_count = count_shapefile_features(path); // create *.index - create_shapefile_index(path, index_parts); + REQUIRE(create_shapefile_index(path, index_parts) == 0); if (feature_count == 0) { REQUIRE(!mapnik::util::exists(index_path)); // index won't be created if there's no features