fix missing coverage (#533)

* investigate missing coverage

* test different pattern

* wip pattern testing

* try globastar
This commit is contained in:
Giovanni Petrantoni 2021-02-23 12:50:43 +09:00 committed by GitHub
parent 8236319a91
commit 2015a878ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 5 deletions

View File

@ -31,7 +31,9 @@ jobs:
nim c $NIM_OPTIONS -r ${{ matrix.test-program }} nim c $NIM_OPTIONS -r ${{ matrix.test-program }}
cd nimcache; rm *.c; cd .. cd nimcache; rm *.c; cd ..
lcov --capture --directory nimcache --output-file coverage/coverage.info lcov --capture --directory nimcache --output-file coverage/coverage.info
lcov --extract coverage/coverage.info `pwd`/libp2p/* `pwd`/libp2p/**/* `pwd`/libp2p/**/**/* --output-file coverage/coverage.f.info shopt -s globstar
ls `pwd`/libp2p/{*,**/*}.nim
lcov --extract coverage/coverage.info `pwd`/libp2p/{*,**/*}.nim --output-file coverage/coverage.f.info
export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '` export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '`
genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output
echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt
@ -67,7 +69,9 @@ jobs:
nim c $NIM_OPTIONS -r ${{ matrix.test-program }} nim c $NIM_OPTIONS -r ${{ matrix.test-program }}
cd nimcache; rm *.c; cd .. cd nimcache; rm *.c; cd ..
lcov --capture --directory nimcache --output-file coverage/coverage.info lcov --capture --directory nimcache --output-file coverage/coverage.info
lcov --extract coverage/coverage.info `pwd`/libp2p/* `pwd`/libp2p/**/* `pwd`/libp2p/**/**/* --output-file coverage/coverage.f.info shopt -s globstar
ls `pwd`/libp2p/{*,**/*}.nim
lcov --extract coverage/coverage.info `pwd`/libp2p/{*,**/*}.nim --output-file coverage/coverage.f.info
export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '` export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '`
genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output
echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt
@ -106,7 +110,9 @@ jobs:
nim c $NIM_OPTIONS -r ${{ matrix.test-program }} nim c $NIM_OPTIONS -r ${{ matrix.test-program }}
cd nimcache; rm *.c; cd .. cd nimcache; rm *.c; cd ..
lcov --capture --directory nimcache --output-file coverage/coverage.info lcov --capture --directory nimcache --output-file coverage/coverage.info
lcov --extract coverage/coverage.info `pwd`/libp2p/* `pwd`/libp2p/**/* `pwd`/libp2p/**/**/* --output-file coverage/coverage.f.info shopt -s globstar
ls `pwd`/libp2p/{*,**/*}.nim
lcov --extract coverage/coverage.info `pwd`/libp2p/{*,**/*}.nim --output-file coverage/coverage.f.info
export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '` export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '`
genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output
echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt