Skip to content

Commit

Permalink
Coverage improvements (#385)
Browse files Browse the repository at this point in the history
* Omit includes directory from coverage
* Use MAPNIK_{MAJOR,MINOR,PATCH}_VERSION for ease of reability
* Cleaning up tests
  • Loading branch information
hummeltech authored Feb 4, 2024
1 parent 6d00447 commit 460efcc
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .github/actions/coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
lcov ${{ inputs.lcov-extra-options }} \
--output-file coverage.info \
--remove coverage.info \
"${GITHUB_WORKSPACE}/includes/catch/catch.hpp" \
"${GITHUB_WORKSPACE}/includes/*" \
"${GITHUB_WORKSPACE}/src/gen_tile_test.cpp" \
"/usr/*"
working-directory: build
Expand Down
1 change: 1 addition & 0 deletions includes/renderd.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ extern struct request_queue * render_request_queue;
void statsRenderFinish(int z, long time);
void request_exit(void);
void send_response(struct item *item, enum protoCmd rsp, int render_time);
enum protoCmd rx_request(struct protocol *req, int fd);

#ifdef __cplusplus
}
Expand Down
4 changes: 2 additions & 2 deletions src/gen_tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#define image_32 image_rgba8
#include <mapnik/image.hpp>
#include <mapnik/image_view_any.hpp>
#if MAPNIK_VERSION >= 400000
#if MAPNIK_MAJOR_VERSION >= 4
#include <mapnik/geometry/box2d.hpp>
#else
#include <mapnik/box2d.hpp>
Expand Down Expand Up @@ -361,7 +361,7 @@ static enum protoCmd render(Map &m, const char *tile_dir, char *xmlname, project

void render_init(const char *plugins_dir, const char* font_dir, int font_dir_recurse)
{
g_logger(G_LOG_LEVEL_INFO, "Renderd is using mapnik version %i.%i.%i", ((MAPNIK_VERSION) / 100000), (((MAPNIK_VERSION) / 100) % 1000), ((MAPNIK_VERSION) % 100));
g_logger(G_LOG_LEVEL_INFO, "Renderd is using mapnik version %i.%i.%i", MAPNIK_MAJOR_VERSION, MAPNIK_MINOR_VERSION, MAPNIK_PATCH_VERSION);
mapnik::datasource_cache::instance().register_datasources(plugins_dir);
load_fonts(font_dir, font_dir_recurse);
}
Expand Down
Loading

0 comments on commit 460efcc

Please sign in to comment.