disable doc tests when crossing

This commit is contained in:
Jorge Aparicio 2016-03-08 08:57:35 -05:00
parent 5e78697ab1
commit 02a37e0ee9
1 changed files with 18 additions and 0 deletions

View File

@ -2,5 +2,23 @@
set -ex
case "$TRAVIS_OS_NAME" in
linux)
host=x86_64-unknown-linux-gnu
;;
osx)
host=x86_64-apple-darwin
;;
esac
# NOTE Workaround for rust-lang/rust#31907 - disable doc tests when crossing
if [ "$host" != "$TARGET" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew install gnu-sed --default-names
fi
find src -name '*.rs' -type f | xargs sed -i -e 's:\(//.\s*```\):\1 ignore,:g'
fi
cargo build --target $TARGET --verbose
cargo test --target $TARGET --verbose