tarantool / tarantool-qa

QA related issues of Tarantool
3 stars 0 forks source link

build: coverage build creates wrong path in meta part of *.gcda file for src/ path #117

Open avtikhon opened 3 years ago

avtikhon commented 3 years ago

Changing the way of running debug build with coverage collecting at https://github.com/tarantool/tarantool/pull/5949 was found that for paths based on src/ root directory make routine automatically adds additional src/ directory prefix in the meta data path of creating .gcda files for src/ paths. In that pull-request was started discussion how we can avoid of it w/o workaround with linking paths https://github.com/tarantool/tarantool/pull/5949#discussion_r606936522 . This issue created for it.

So what was changed during caused the issue pull-request:

  1. Docker image 'ghcr.io/avtikhon/tarantool/testing/debian-buster' was changed to Github Actions host snapshot based on 'ubuntu-20.04'
  2. cmake: 3.13.4 -> 3.19.7
  3. make: GNU Make 4.2.1 == GNU Make 4.2.1
  4. gcc/gcov: gcc (Debian 8.3.0-6) 8.3.0 -> gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
  5. lcov: lcov: LCOV version 1.13 -> lcov: LCOV version 1.14

Running: lcov --compat-libtool --directory src/ --capture --output-file coverage.info.tmp --rc lcov_branch_coverage=1 --rc lcov_function_coverage=1 it shows issue:

Processing lib/uri/CMakeFiles/uri.dir/uri.c.gcda
Cannot open source file src/lib/uri/uri.rl
Cannot open source file src/lib/uri/uri.c

to fix it was added workaround - created link to the needed path before this command: ln -s ${PWD}/src src/lib/uri/src on Tarantool 1.10 it should be: ln -s ${PWD}/src src/src