Clarify optional libraries and allow optionally disabling them (#453)

`libcurl` & `libcairo` are also optional and their usage can now be optionally disabled (along with `libmemcached` & `librados`.)

* No longer test macOS Autotools building
This commit is contained in:
Hummeltech
2024-06-28 13:51:12 -07:00
committed by GitHub
parent 52e7a10762
commit c4e3e6230c
4 changed files with 57 additions and 14 deletions

View File

@ -1206,8 +1206,31 @@ TEST_CASE("rados storage-backend", "RADOS Tile storage backend")
}
}
TEST_CASE("ro_composite storage-backend", "RO Composite Tile storage backend")
{
int found;
std::string err_log_lines, out_log_lines;
struct storage_backend *store = NULL;
#ifndef HAVE_CAIRO
SECTION("storage/initialise", "should return NULL") {
start_capture();
REQUIRE(init_storage_backend("composite:{") == NULL);
std::tie(err_log_lines, out_log_lines) = end_capture();
found = err_log_lines.find("init_storage_ro_coposite: Support for compositing storage has not been compiled into this program");
REQUIRE(found > -1);
}
#endif
}
TEST_CASE("ro_http_proxy storage-backend", "RO HTTP Proxy Tile storage backend")
{
int found;
std::string err_log_lines, out_log_lines;
struct storage_backend *store = NULL;
#ifdef HAVE_LIBCURL
SECTION("storage/initialise", "should return 1") {
struct storage_backend *store = NULL;
@ -1216,6 +1239,16 @@ TEST_CASE("ro_http_proxy storage-backend", "RO HTTP Proxy Tile storage backend")
store->close_storage(store);
}
#else
SECTION("storage/initialise", "should return NULL") {
start_capture();
REQUIRE(init_storage_backend("ro_http_proxy://") == NULL);
std::tie(err_log_lines, out_log_lines) = end_capture();
found = err_log_lines.find("init_storage_ro_http_proxy: Support for curl and therefore the http proxy storage has not been compiled into this program");
REQUIRE(found > -1);
}
#endif
}
TEST_CASE("projections", "Test projections")