From: Petr Špaček Date: Sat, 23 Dec 2017 22:47:24 +0000 (+0100) Subject: fixup! build: added `make coverage` to compute C and Lua code coverage X-Git-Tag: v2.0.0~49^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d551d5fa693ee3ed1b049202817178bcb42e530;p=thirdparty%2Fknot-resolver.git fixup! build: added `make coverage` to compute C and Lua code coverage Test coverage results for Lua code were off-by-one line. --- diff --git a/scripts/luacov_to_info.lua b/scripts/luacov_to_info.lua index 13bf583d0..372f5c05f 100755 --- a/scripts/luacov_to_info.lua +++ b/scripts/luacov_to_info.lua @@ -29,7 +29,7 @@ local function write_lcov_info(files) print('TN:') print(string.format('SF:%s', fname)) for i, hits in pairs(finfo.coverage) do - print(string.format('DA:%d,%d', i - 1, hits)) + print(string.format('DA:%d,%d', i, hits)) instrumented = instrumented + 1 if hits > 0 then nonzero = nonzero + 1 @@ -53,4 +53,4 @@ for _, fname in ipairs(arg) do end -- Write results -write_lcov_info(all_files) \ No newline at end of file +write_lcov_info(all_files)