SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
712 stars 109 forks source link

Issue #323: bash engine: drain stdout of instrumented script #324

Closed dciabrin closed 4 years ago

dciabrin commented 4 years ago

When bash supports xtrace fd, no kcov marker can come from the instrumented script's stdout, so it's safe to drain it as soon as data is written to it, without waiting for '\n'.

stdout writers: Sum code/executed lines before generating headers

codecov[bot] commented 4 years ago

Codecov Report

Merging #324 into master will increase coverage by 0.10%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
+ Coverage   70.18%   70.28%   +0.10%     
==========================================
  Files          57       57              
  Lines        3706     3719      +13     
==========================================
+ Hits         2601     2614      +13     
  Misses       1105     1105              
Impacted Files Coverage Δ
src/include/utils.hh 77.27% <ø> (ø)
src/engines/bash-engine.cc 89.18% <100.00%> (+0.22%) :arrow_up:
src/utils.cc 62.40% <100.00%> (+1.04%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bd3a791...2009520. Read the comment docs.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.1%) to 70.288% when pulling 200952016b9462bd8b73456254a5731eda3704ad on dciabrin:drain-stdout into 64eb351d8e1baa491f6a23bb7ea912b0844ee6fd on SimonKagstrom:master.

SimonKagstrom commented 4 years ago

Thanks a lot for the fix!