Skip to content

Commit 460efcc

Browse files
authored
Coverage improvements (#385)
* Omit includes directory from coverage * Use MAPNIK_{MAJOR,MINOR,PATCH}_VERSION for ease of reability * Cleaning up tests
1 parent 6d00447 commit 460efcc

5 files changed

Lines changed: 263 additions & 189 deletions

File tree

.github/actions/coverage/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616
lcov ${{ inputs.lcov-extra-options }} \
1717
--output-file coverage.info \
1818
--remove coverage.info \
19-
"${GITHUB_WORKSPACE}/includes/catch/catch.hpp" \
19+
"${GITHUB_WORKSPACE}/includes/*" \
2020
"${GITHUB_WORKSPACE}/src/gen_tile_test.cpp" \
2121
"/usr/*"
2222
working-directory: build

includes/renderd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ extern struct request_queue * render_request_queue;
6969
void statsRenderFinish(int z, long time);
7070
void request_exit(void);
7171
void send_response(struct item *item, enum protoCmd rsp, int render_time);
72+
enum protoCmd rx_request(struct protocol *req, int fd);
7273

7374
#ifdef __cplusplus
7475
}

src/gen_tile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#define image_32 image_rgba8
5858
#include <mapnik/image.hpp>
5959
#include <mapnik/image_view_any.hpp>
60-
#if MAPNIK_VERSION >= 400000
60+
#if MAPNIK_MAJOR_VERSION >= 4
6161
#include <mapnik/geometry/box2d.hpp>
6262
#else
6363
#include <mapnik/box2d.hpp>
@@ -361,7 +361,7 @@ static enum protoCmd render(Map &m, const char *tile_dir, char *xmlname, project
361361

362362
void render_init(const char *plugins_dir, const char* font_dir, int font_dir_recurse)
363363
{
364-
g_logger(G_LOG_LEVEL_INFO, "Renderd is using mapnik version %i.%i.%i", ((MAPNIK_VERSION) / 100000), (((MAPNIK_VERSION) / 100) % 1000), ((MAPNIK_VERSION) % 100));
364+
g_logger(G_LOG_LEVEL_INFO, "Renderd is using mapnik version %i.%i.%i", MAPNIK_MAJOR_VERSION, MAPNIK_MINOR_VERSION, MAPNIK_PATCH_VERSION);
365365
mapnik::datasource_cache::instance().register_datasources(plugins_dir);
366366
load_fonts(font_dir, font_dir_recurse);
367367
}

0 commit comments

Comments
 (0)