Skip to content

Commit

Permalink
ci(dist/travis.sh): attempt to workaround Rust 1.44 breakage of cargo…
Browse files Browse the repository at this point in the history
…-kcov

Filed as kennytm/cargo-kcov#48 .
  • Loading branch information
pkgw committed Jun 16, 2020
1 parent 23cfbd0 commit ab14615
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dist/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,21 @@ if $is_main_build ; then
travis_fold_start cargo_kcov "cargo kcov" verbose
travis_retry sudo apt-get install -y kcov
cargo install --force cargo-kcov

# As of Rust 1.44, test executables land in target/debug/deps/ instead of
# target/debug/, which messes up current cargo-kcov (0.5.2) because it tries
# to search for those executables. Work around with `cp`. One of the
# `tectonic-*` binaries is the debug executable, which is hard-linked to
# `target/debug/tectonic`. kcov will erroneously try to run this as a test
# if we copy it, so we have to make not to do that, which we accomplish with
# a search based on the hardlink count. Hacky and fragile but this should
# get us going. Hopefully kcov will get fixed where this will become
# unneccessary anyway.
rm target/debug/deps/tectonic-????????????????
cargo test --no-run
find target/debug/deps/tectonic-???????????????? -links 2 -print -delete
cp -vp target/debug/deps/*-???????????????? target/debug/

env RUNNING_COVERAGE=1 cargo kcov --no-clean-rebuild
bash <(curl -s https://codecov.io/bash)
travis_fold_end cargo_kcov
Expand Down

0 comments on commit ab14615

Please sign in to comment.