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 &> rustfmt_output
25 if [[ $? != 0 ]]; then
30 ! cat rustfmt_output | grep -q "internal error"
31 if [[ $? != 0 ]]; then
34 ! cat rustfmt_output | grep -q "warning"
35 if [[ $? != 0 ]]; then
38 ! cat rustfmt_output | grep -q "Warning"
39 if [[ $? != 0 ]]; then
43 if [[ $? != 0 ]]; then
50 if [[ $? != 0 ]]; then
54 if [[ $? != 0 ]]; then
59 case ${INTEGRATION} in
61 git clone --depth=1 https://github.com/rust-lang/${INTEGRATION}.git
63 export CFG_DISABLE_CROSS_TESTS=1
68 git clone --depth=1 https://github.com/rust-lang-nursery/${INTEGRATION}.git
69 cd ${INTEGRATION}/failure-1.X
74 git clone --depth=1 https://github.com/rust-lang-nursery/${INTEGRATION}.git