Skip to content

Commit

Permalink
update send_kcov.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alopatindev committed Dec 12, 2016
1 parent 5ae4d6f commit 7316d21
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions scripts/send_kcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7316d21

Please sign in to comment.