Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b8a133d

Browse files
authored
Merge pull request rust-lang#3145 from otavio/allow-failure-for-crater
CI: only run unit tests for `crater`
2 parents 8506f5e + c4dd450 commit b8a133d

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ matrix:
3535
- env: INTEGRATION=stdsimd
3636
- env: INTEGRATION=tempdir
3737
allow_failures:
38-
# Doesn't build
39-
- env: INTEGRATION=futures-rs
4038
# Doesn't build - seems to be because of an option
4139
- env: INTEGRATION=packed_simd
4240
# Test failure

ci/integration.sh

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,25 @@ cargo fmt -- --version
2424
#
2525
# * `cargo fmt --all` succeeds without any warnings or errors
2626
# * `cargo fmt --all -- --check` after formatting returns success
27-
# * `cargo test -all` still passes (formatting did not break the build)
28-
function check_fmt {
29-
cargo test --all
27+
# * `cargo test --all` still passes (formatting did not break the build)
28+
function check_fmt_with_all_tests {
29+
check_fmt_base "--all"
30+
return $?
31+
}
32+
33+
# Checks that:
34+
#
35+
# * `cargo fmt --all` succeeds without any warnings or errors
36+
# * `cargo fmt --all -- --check` after formatting returns success
37+
# * `cargo test --lib` still passes (formatting did not break the build)
38+
function check_fmt_with_lib_tests {
39+
check_fmt_base "--lib"
40+
return $?
41+
}
42+
43+
function check_fmt_base {
44+
local test_args="$1"
45+
cargo test $test_args
3046
if [[ $? != 0 ]]; then
3147
return 0
3248
fi
@@ -54,7 +70,7 @@ function check_fmt {
5470
cat rustfmt_check_output
5571
return 1
5672
fi
57-
cargo test --all
73+
cargo test $test_args
5874
if [[ $? != 0 ]]; then
5975
return $?
6076
fi
@@ -65,13 +81,19 @@ case ${INTEGRATION} in
6581
git clone --depth=1 https://github.com/rust-lang/${INTEGRATION}.git
6682
cd ${INTEGRATION}
6783
export CFG_DISABLE_CROSS_TESTS=1
68-
check_fmt
84+
check_fmt_with_all_tests
85+
cd -
86+
;;
87+
crater)
88+
git clone --depth=1 https://github.com/rust-lang-nursery/${INTEGRATION}.git
89+
cd ${INTEGRATION}
90+
check_fmt_with_lib_tests
6991
cd -
7092
;;
7193
*)
7294
git clone --depth=1 https://github.com/rust-lang-nursery/${INTEGRATION}.git
7395
cd ${INTEGRATION}
74-
check_fmt
96+
check_fmt_with_all_tests
7597
cd -
7698
;;
7799
esac

0 commit comments

Comments
 (0)