fix shapeindex tests - closes #3252
This commit is contained in:
parent
fa5bbd99fa
commit
c037fcba36
2 changed files with 4 additions and 3 deletions
|
@ -10,6 +10,7 @@ fi
|
||||||
export PATH=$(pwd)/utils/mapnik-render/:${PATH}
|
export PATH=$(pwd)/utils/mapnik-render/:${PATH}
|
||||||
export PATH=$(pwd)/utils/mapnik-index/:${PATH}
|
export PATH=$(pwd)/utils/mapnik-index/:${PATH}
|
||||||
export PATH=$(pwd)/utils/mapnik-config/:${PATH}
|
export PATH=$(pwd)/utils/mapnik-config/:${PATH}
|
||||||
|
export PATH=$(pwd)/utils/shapeindex/:${PATH}
|
||||||
|
|
||||||
# mapnik-settings.env is an optional file to store
|
# mapnik-settings.env is an optional file to store
|
||||||
# environment variables that should be used before
|
# environment variables that should be used before
|
||||||
|
|
|
@ -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 += std::string("DYLD_LIBRARY_PATH=") + std::getenv("DYLD_LIBRARY_PATH") + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd += "shapeindex";
|
cmd += "shapeindex ";
|
||||||
if (index_parts) cmd+= " --index-parts ";
|
if (index_parts) cmd+= "--index-parts ";
|
||||||
cmd += filename;
|
cmd += filename;
|
||||||
if (silent)
|
if (silent)
|
||||||
{
|
{
|
||||||
|
@ -104,7 +104,7 @@ TEST_CASE("shapeindex")
|
||||||
// count features
|
// count features
|
||||||
std::size_t feature_count = count_shapefile_features(path);
|
std::size_t feature_count = count_shapefile_features(path);
|
||||||
// create *.index
|
// create *.index
|
||||||
create_shapefile_index(path, index_parts);
|
REQUIRE(create_shapefile_index(path, index_parts) == 0);
|
||||||
if (feature_count == 0)
|
if (feature_count == 0)
|
||||||
{
|
{
|
||||||
REQUIRE(!mapnik::util::exists(index_path)); // index won't be created if there's no features
|
REQUIRE(!mapnik::util::exists(index_path)); // index won't be created if there's no features
|
||||||
|
|
Loading…
Reference in a new issue