taste-collect-coverage 420 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/bash -e

# Run the tracer daemon - make sure only one instance exists at a time
if [ ! -f "$1" ]
then
    echo 'Usage: taste-collect-coverage binary'
else
    echo Executing binary for 10 seconds...
    "$1" &
    pid=$!
    sleep 10
    kill -SIGUSR2 $pid
    lcov --capture --directory .. --output-file coverage.info
    genhtml coverage.info --output-directory coverage
    xdg-open coverage/index.html    
fi