about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Cameron <nrc@ncameron.org>2018-11-02 10:08:39 +1300
committerGitHub <noreply@github.com>2018-11-02 10:08:39 +1300
commitb8a133d432fc5af0eee5bb30d05b1e07875aea72 (patch)
tree283bd3edfc1abd0940b75f3e37672df72d736294
parent8506f5e5ce2f4e27f3e1a6a924f66859e2474dd5 (diff)
parentc4dd45060de3a0c07b93e6f99b30806216c68cf9 (diff)
Merge pull request #3145 from otavio/allow-failure-for-crater
CI: only run unit tests for `crater`
-rw-r--r--.travis.yml2
-rwxr-xr-xci/integration.sh34
2 files changed, 28 insertions, 8 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
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