mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-08-01 07:43:30 +00:00
Improve render_expired
/render_list
test coverage (#415)
This commit is contained in:
@ -305,13 +305,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
store = init_storage_backend(tile_dir);
|
||||
|
||||
if (store == NULL) {
|
||||
g_logger(G_LOG_LEVEL_CRITICAL, "Failed to initialise storage backend %s", tile_dir);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// initialise arrays for tile markings
|
||||
|
||||
tile_requested = (unsigned int **)malloc((max_zoom - excess_zoomlevels + 1) * sizeof(unsigned int *));
|
||||
@ -328,6 +321,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
store = init_storage_backend(tile_dir);
|
||||
|
||||
if (store == NULL) {
|
||||
g_logger(G_LOG_LEVEL_CRITICAL, "Failed to initialise storage backend %s", tile_dir);
|
||||
return 1;
|
||||
}
|
||||
|
||||
g_logger(G_LOG_LEVEL_INFO, "Started render_expired with the following options:");
|
||||
|
||||
if (config_file_name_passed) {
|
||||
|
@ -307,13 +307,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
store = init_storage_backend(tile_dir);
|
||||
|
||||
if (store == NULL) {
|
||||
g_logger(G_LOG_LEVEL_CRITICAL, "Failed to initialise storage backend %s", tile_dir);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (all) {
|
||||
if ((min_x != -1 || min_y != -1 || max_x != -1 || max_y != -1) && min_zoom != max_zoom) {
|
||||
g_logger(G_LOG_LEVEL_CRITICAL, "min-zoom must be equal to max-zoom when using min-x, max-x, min-y, or max-y options");
|
||||
@ -351,6 +344,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
store = init_storage_backend(tile_dir);
|
||||
|
||||
if (store == NULL) {
|
||||
g_logger(G_LOG_LEVEL_CRITICAL, "Failed to initialise storage backend %s", tile_dir);
|
||||
return 1;
|
||||
}
|
||||
|
||||
g_logger(G_LOG_LEVEL_INFO, "Started render_list with the following options:");
|
||||
|
||||
if (config_file_name_passed) {
|
||||
|
@ -338,11 +338,10 @@ foreach(STORAGE_BACKEND_INDEX RANGE ${STORAGE_BACKENDS_LENGTH})
|
||||
|
||||
add_test(NAME render_expired_${SOCKET_TYPE}_${STORAGE_BACKEND}
|
||||
COMMAND ${BASH} -c "
|
||||
echo '0/0/0' | $<TARGET_FILE:render_expired> \
|
||||
printf '0/0/0\n%.0s' {0..100} | $<TARGET_FILE:render_expired> \
|
||||
--map ${DEFAULT_MAP_NAME} \
|
||||
--max-zoom 5 \
|
||||
--min-zoom 0 \
|
||||
--no-progress \
|
||||
--num-threads 1 \
|
||||
--socket ${SOCKET} \
|
||||
--tile-dir ${TILE_DIR} \
|
||||
@ -357,8 +356,9 @@ foreach(STORAGE_BACKEND_INDEX RANGE ${STORAGE_BACKENDS_LENGTH})
|
||||
)
|
||||
add_test(NAME render_expired_config_${SOCKET_TYPE}_${STORAGE_BACKEND}
|
||||
COMMAND ${BASH} -c "
|
||||
echo '3/0/3' | $<TARGET_FILE:render_expired> \
|
||||
--config ${RENDERD_CONF}
|
||||
echo '100/100/100' | $<TARGET_FILE:render_expired> \
|
||||
--config ${RENDERD_CONF} \
|
||||
--no-progress
|
||||
"
|
||||
WORKING_DIRECTORY tests
|
||||
)
|
||||
@ -374,7 +374,6 @@ foreach(STORAGE_BACKEND_INDEX RANGE ${STORAGE_BACKENDS_LENGTH})
|
||||
--map ${DEFAULT_MAP_NAME} \
|
||||
--max-zoom 5 \
|
||||
--min-zoom 0 \
|
||||
--no-progress \
|
||||
--num-threads 1 \
|
||||
--socket ${SOCKET} \
|
||||
--tile-dir ${TILE_DIR} \
|
||||
@ -393,7 +392,6 @@ foreach(STORAGE_BACKEND_INDEX RANGE ${STORAGE_BACKENDS_LENGTH})
|
||||
--map ${DEFAULT_MAP_NAME} \
|
||||
--max-zoom 5 \
|
||||
--min-zoom 0 \
|
||||
--no-progress \
|
||||
--num-threads 1 \
|
||||
--socket ${SOCKET} \
|
||||
--tile-dir ${TILE_DIR} \
|
||||
|
Reference in New Issue
Block a user