From 693a2fc23a51c6df79f2c17b0b9510bdf1a71f32 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 27 Oct 2018 22:05:46 -0300 Subject: [PATCH 1/2] CI: Rework integration script so only lib unit tests are run for crater Refs: https://github.com/rust-lang-nursery/crater/issues/358 Signed-off-by: Otavio Salvador --- ci/integration.sh | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/ci/integration.sh b/ci/integration.sh index b360b1468e2..1e050218905 100755 --- a/ci/integration.sh +++ b/ci/integration.sh @@ -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 @@ -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 @@ -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 From c4dd45060de3a0c07b93e6f99b30806216c68cf9 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 1 Nov 2018 17:56:54 -0300 Subject: [PATCH 2/2] Travis CI: Move `futures-rs` out from allow-failures Signed-off-by: Otavio Salvador --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 42e0938d782..e38ed696d17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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