Skip to content

Commit

Permalink
Merge pull request rust-lang#3145 from otavio/allow-failure-for-crater
Browse files Browse the repository at this point in the history
CI: only run unit tests for `crater`
  • Loading branch information
nrc authored Nov 1, 2018
2 parents 8506f5e + c4dd450 commit b8a133d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ matrix:
- env: INTEGRATION=stdsimd
- env: INTEGRATION=tempdir
allow_failures:
# Doesn't build
- env: INTEGRATION=futures-rs
# Doesn't build - seems to be because of an option
- env: INTEGRATION=packed_simd
# Test failure
Expand Down
34 changes: 28 additions & 6 deletions ci/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,25 @@ cargo fmt -- --version
#
# * `cargo fmt --all` succeeds without any warnings or errors
# * `cargo fmt --all -- --check` after formatting returns success
# * `cargo test -all` still passes (formatting did not break the build)
function check_fmt {
cargo test --all
# * `cargo test --all` still passes (formatting did not break the build)
function check_fmt_with_all_tests {
check_fmt_base "--all"
return $?
}

# Checks that:
#
# * `cargo fmt --all` succeeds without any warnings or errors
# * `cargo fmt --all -- --check` after formatting returns success
# * `cargo test --lib` still passes (formatting did not break the build)
function check_fmt_with_lib_tests {
check_fmt_base "--lib"
return $?
}

function check_fmt_base {
local test_args="$1"
cargo test $test_args
if [[ $? != 0 ]]; then
return 0
fi
Expand Down Expand Up @@ -54,7 +70,7 @@ function check_fmt {
cat rustfmt_check_output
return 1
fi
cargo test --all
cargo test $test_args
if [[ $? != 0 ]]; then
return $?
fi
Expand All @@ -65,13 +81,19 @@ case ${INTEGRATION} in
git clone --depth=1 https://github.com/rust-lang/${INTEGRATION}.git
cd ${INTEGRATION}
export CFG_DISABLE_CROSS_TESTS=1
check_fmt
check_fmt_with_all_tests
cd -
;;
crater)
git clone --depth=1 https://github.com/rust-lang-nursery/${INTEGRATION}.git
cd ${INTEGRATION}
check_fmt_with_lib_tests
cd -
;;
*)
git clone --depth=1 https://github.com/rust-lang-nursery/${INTEGRATION}.git
cd ${INTEGRATION}
check_fmt
check_fmt_with_all_tests
cd -
;;
esac

0 comments on commit b8a133d

Please sign in to comment.