Skip to content

Commit 89f453c

Browse files
committed
Fix and tweak integration tests
1 parent b0eb899 commit 89f453c

File tree

2 files changed

+19
-32
lines changed

2 files changed

+19
-32
lines changed

.travis.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,31 @@ matrix:
1919
- env: CFG_RELEASE_CHANNEL=beta
2020
- os: osx
2121
- env: INTEGRATION=cargo
22+
- env: INTEGRATION=chalk
2223
- env: INTEGRATION=rust-clippy
2324
- env: INTEGRATION=mdbook
2425
- env: INTEGRATION=stdsimd
25-
- env: INTEGRATION=rust-semverver
26-
- env: INTEGRATION=chalk
2726
- env: INTEGRATION=crater
2827
- env: INTEGRATION=futures-rs
2928
- env: INTEGRATION=rand
3029
- env: INTEGRATION=failure
3130
- env: INTEGRATION=error-chain
3231
- env: INTEGRATION=bitflags
3332
- env: INTEGRATION=log
33+
- env: INTEGRATION=glob
34+
- env: INTEGRATION=tempdir
35+
- env: INTEGRATION=rust-semverver
3436
allow_failures:
35-
- env: INTEGRATION=cargo
36-
- env: INTEGRATION=stdsimd
37-
- env: INTEGRATION=mdbook
37+
# PR sent
3838
- env: INTEGRATION=crater
39-
- env: INTEGRATION=rust-semverver
40-
- env: INTEGRATION=rust-clippy
41-
- env: INTEGRATION=chalk
42-
- env: INTEGRATION=bitflags
43-
- env: INTEGRATION=error-chain
44-
- env: INTEGRATION=failure
45-
- env: INTEGRATION=futures-rs
46-
- env: INTEGRATION=log
39+
# #2721
4740
- env: INTEGRATION=rand
48-
- env: INTEGRATION=glob
49-
- env: INTEGRATION=tempdir
41+
# dues to a test failure (fails before Rustfmt'ing too)
42+
- env: INTEGRATION=stdsimd
43+
# Need to run an lalrpop build step before testing?
44+
- env: INTEGRATION=chalk
45+
# Doesn't build
46+
- env: INTEGRATION=rust-semverver
5047

5148
before_script:
5249
- |

ci/integration.sh

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ set -ex
44

55
: ${INTEGRATION?"The INTEGRATION environment variable must be set."}
66

7-
# FIXME: this is causing the build to fail when rustfmt is found in .cargo/bin
8-
# but cargo-fmt is not found.
7+
# FIXME: this means we can get a stale cargo-fmt from a previous run.
98
#
109
# `which rustfmt` fails if rustfmt is not found. Since we don't install
1110
# `rustfmt` via `rustup`, this is the case unless we manually install it. Once
@@ -15,12 +14,14 @@ set -ex
1514
# here after the first installation will find `rustfmt` and won't need to build
1615
# it again.
1716
#
18-
# which rustfmt || cargo install --force
17+
#which cargo-fmt || cargo install --force
1918
cargo install --force
2019

2120
echo "Integration tests for: ${INTEGRATION}"
21+
cargo fmt -- --version
2222

2323
function check_fmt {
24+
touch rustfmt.toml
2425
cargo fmt --all -v 2>&1 | tee rustfmt_output
2526
if [[ $? != 0 ]]; then
2627
cat rustfmt_output
@@ -45,35 +46,24 @@ function check_fmt {
4546
fi
4647
}
4748

48-
function check {
49-
cargo test --all
50-
if [[ $? != 0 ]]; then
51-
return 1
52-
fi
53-
check_fmt
54-
if [[ $? != 0 ]]; then
55-
return 1
56-
fi
57-
}
58-
5949
case ${INTEGRATION} in
6050
cargo)
6151
git clone --depth=1 https://github.com/rust-lang/${INTEGRATION}.git
6252
cd ${INTEGRATION}
6353
export CFG_DISABLE_CROSS_TESTS=1
64-
check
54+
check_fmt
6555
cd -
6656
;;
6757
failure)
6858
git clone --depth=1 https://github.com/rust-lang-nursery/${INTEGRATION}.git
6959
cd ${INTEGRATION}/failure-1.X
70-
check
60+
check_fmt
7161
cd -
7262
;;
7363
*)
7464
git clone --depth=1 https://github.com/rust-lang-nursery/${INTEGRATION}.git
7565
cd ${INTEGRATION}
76-
check
66+
check_fmt
7767
cd -
7868
;;
7969
esac

0 commit comments

Comments
 (0)