diff --git a/scripts/send_kcov.sh b/scripts/send_kcov.sh index 8315f28..291f8fd 100755 --- a/scripts/send_kcov.sh +++ b/scripts/send_kcov.sh @@ -8,17 +8,16 @@ PKGNAMEVER="${PKGID#*#}" PKGNAME="$(echo $ORIGIN | sed 's!.*\/!!')" shift cargo test --no-run || exit $? -EXE=($ORIGIN/target/debug/$PKGNAME-*) -if [ ${#EXE[@]} -ne 1 ]; then - echo 'Non-unique test file, retrying...' >2 - rm -f ${EXE[@]} - cargo test --no-run || exit $? -fi -kcov/build/src/kcov \ - --exclude-pattern=/.cargo,/usr/lib \ - --verify \ - --coveralls-id=$TRAVIS_JOB_ID \ - $ORIGIN/target/cov \ - $ORIGIN/target/debug/$PKGNAME-* \ - "$@" +for i in $ORIGIN/target/debug/${PKGNAME}* +do + echo "send_kcov: $i" + OUTDIR="target/cov/$(basename $i)" + mkdir -p "${OUTDIR}" + kcov/build/src/kcov \ + --exclude-pattern=/.cargo,/usr/lib \ + --verify \ + --coveralls-id=${TRAVIS_JOB_ID} \ + "${OUTDIR}" \ + "$i" +done