From a73d2f7d948ebd42f36ac6f527c9f5481e9e9381 Mon Sep 17 00:00:00 2001 From: Mathis Logemann Date: Sat, 9 Oct 2021 13:46:55 +0200 Subject: [PATCH] [unit-tests] fix windows 11 path search --- test/unit/datasource/ds_test_util.hpp | 6 +++++- test/unit/datasource/shapeindex.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/test/unit/datasource/ds_test_util.hpp b/test/unit/datasource/ds_test_util.hpp index b6c45e554..09237b067 100644 --- a/test/unit/datasource/ds_test_util.hpp +++ b/test/unit/datasource/ds_test_util.hpp @@ -199,7 +199,11 @@ inline int create_disk_index(std::string const& filename, bool silent = true) { cmd += std::string("DYLD_LIBRARY_PATH=") + std::getenv("DYLD_LIBRARY_PATH") + " "; } - cmd += "mapnik-index " + filename; + cmd += "mapnik-index"; +#ifdef _WINDOWS + cmd += ".exe"; +#endif + cmd += " " + filename; if (silent) { #ifndef _WINDOWS diff --git a/test/unit/datasource/shapeindex.cpp b/test/unit/datasource/shapeindex.cpp index 61b421e72..6cfbf0dc6 100644 --- a/test/unit/datasource/shapeindex.cpp +++ b/test/unit/datasource/shapeindex.cpp @@ -74,8 +74,11 @@ 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 "; + cmd += "shapeindex"; + #ifdef _WINDOWS + cmd += ".exe"; + #endif + cmd += " "; if (index_parts) cmd+= "--index-parts "; cmd += filename; if (silent)