5 : ${INTEGRATION?"The INTEGRATION environment variable must be set."}
7 # FIXME: this is causing the build to fail when rustfmt is found in .cargo/bin
8 # but cargo-fmt is not found.
10 # `which rustfmt` fails if rustfmt is not found. Since we don't install
11 # `rustfmt` via `rustup`, this is the case unless we manually install it. Once
12 # that happens, `cargo install --force` will be called, which installs
13 # `rustfmt`, `cargo-fmt`, etc to `~/.cargo/bin`. This directory is cached by
14 # travis (see `.travis.yml`'s "cache" key), such that build-bots that arrive
15 # here after the first installation will find `rustfmt` and won't need to build
18 # which rustfmt || cargo install --force
21 echo "Integration tests for: ${INTEGRATION}"
24 cargo fmt --all -v -- --error-on-unformatted &> rustfmt_output
25 if [[ $? != 0 ]]; then
29 ! cat rustfmt_output | grep -q "internal error"
30 if [[ $? != 0 ]]; then
33 ! cat rustfmt_output | grep -q "warning"
34 if [[ $? != 0 ]]; then
37 ! cat rustfmt_output | grep -q "Warning"
38 if [[ $? != 0 ]]; then
42 if [[ $? != 0 ]]; then
49 if [[ $? != 0 ]]; then
53 if [[ $? != 0 ]]; then
58 case ${INTEGRATION} in
60 git clone https://github.com/rust-lang/${INTEGRATION}.git
62 export CFG_DISABLE_CROSS_TESTS=1
67 git clone https://github.com/rust-lang-nursery/${INTEGRATION}.git
68 cd ${INTEGRATION}/failure-1.X
73 git clone https://github.com/rust-lang-nursery/${INTEGRATION}.git