MXS-2152: Enable code coverage for specific test runs

This commit is contained in:
Markus Mäkelä
2019-05-06 15:58:23 +03:00
parent c0b238a9e7
commit 4717b4c975

View File

@ -70,7 +70,7 @@ ulimit -c unlimited
cd ${script_dir}/../../ cd ${script_dir}/../../
if [[ "$cmake_flags" =~ "GCOV=Y" ]] if [[ "$name" =~ '-gcov' ]]
then then
echo "Building MaxScale from source on maxscale_000" echo "Building MaxScale from source on maxscale_000"
rsync -avz --delete -e "ssh $scpopt" ${script_dir}/../../ $sshuser@$IP:/tmp/MaxScale/ rsync -avz --delete -e "ssh $scpopt" ${script_dir}/../../ $sshuser@$IP:/tmp/MaxScale/
@ -100,9 +100,9 @@ else
ctest -VV ${test_set} ctest -VV ${test_set}
fi fi
if [[ "$cmake_flags" =~ "GCOV=Y" ]] if [[ "$name" =~ '-gcov' ]]
then then
ssh $sshopt "cd /tmp/build && lcov --gcov-tool=$(command -v gcov) -c -d . -o lcov.info && genhtml -o /tmp/gcov-report/ lcov.info" ssh $sshopt 'cd /tmp/build && lcov --gcov-tool=$(command -v gcov) -c -d . -o lcov.info && genhtml -o /tmp/gcov-report/ lcov.info'
rsync -avz --delete -e "ssh $scpopt" $sshuser@$IP:/tmp/gcov-report/ ./${logs_publish_dir} rsync -avz --delete -e "ssh $scpopt" $sshuser@$IP:/tmp/gcov-report/ ./${logs_publish_dir}
fi fi