From 92f7a527f0ac7d2c2c55d0a470bd27794dae22d5 Mon Sep 17 00:00:00 2001 From: Emily Toop Date: Thu, 19 Jul 2018 15:09:59 +0100 Subject: [PATCH] Move test to script --- .travis.yml | 43 ++++--------------------------------------- scripts/cargo_test.sh | 11 +++++++++++ 2 files changed, 15 insertions(+), 39 deletions(-) create mode 100755 scripts/cargo_test.sh diff --git a/.travis.yml b/.travis.yml index de5fb5a2..86fcd597 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,16 +11,7 @@ matrix: - brew install sqlcipher --with-fts rust: 1.25.0 # Must align with `build/version.rs`. script: - - cargo test --verbose --all - - cargo test --features edn/serde_support --verbose --all - # We can't pick individual features out with `cargo test --all` (At the time of this writing, this - # works but does the wrong thing because of a bug in cargo, but its fix will be to disallow doing - # this all-together, see https://github.com/rust-lang/cargo/issues/5364 for more information). To - # work around this, we run individual tests for each subcrate individually. - - | - for manifest in $(find . -type f -name Cargo.toml); do - cargo test --manifest-path $manifest --verbose --no-default-features --features sqlcipher - done + - ./scripts/cargo_test.sh after_success: - | if [[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then @@ -38,16 +29,7 @@ matrix: - brew install sqlcipher --with-fts rust: stable script: - - cargo test --verbose --all - - cargo test --features edn/serde_support --verbose --all - # We can't pick individual features out with `cargo test --all` (At the time of this writing, this - # works but does the wrong thing because of a bug in cargo, but its fix will be to disallow doing - # this all-together, see https://github.com/rust-lang/cargo/issues/5364 for more information). To - # work around this, we run individual tests for each subcrate individually. - - | - for manifest in $(find . -type f -name Cargo.toml); do - cargo test --manifest-path $manifest --verbose --no-default-features --features sqlcipher - done + - ./scripts/cargo_test.sh cache: cargo - language: rust # We use OSX so that we can get a reasonably up to date version of SQLCipher. @@ -57,15 +39,7 @@ matrix: - brew install sqlcipher --with-fts rust: beta script: - - cargo test --verbose --all - # We can't pick individual features out with `cargo test --all` (At the time of this writing, this - # works but does the wrong thing because of a bug in cargo, but its fix will be to disallow doing - # this all-together, see https://github.com/rust-lang/cargo/issues/5364 for more information). To - # work around this, we run individual tests for each subcrate individually. - - | - for manifest in $(find . -type f -name Cargo.toml); do - cargo test --manifest-path $manifest --verbose --no-default-features --features sqlcipher - done + - ./scripts/cargo_test.sh cache: cargo - language: rust # We use OSX so that we can get a reasonably up to date version of SQLCipher. @@ -75,14 +49,5 @@ matrix: - brew install sqlcipher --with-fts rust: nightly script: - - cargo test --verbose --all - - cargo test --features edn/serde_support --verbose --all - # We can't pick individual features out with `cargo test --all` (At the time of this writing, this - # works but does the wrong thing because of a bug in cargo, but its fix will be to disallow doing - # this all-together, see https://github.com/rust-lang/cargo/issues/5364 for more information). To - # work around this, we run individual tests for each subcrate individually. - - | - for manifest in $(find . -type f -name Cargo.toml); do - cargo test --manifest-path $manifest --verbose --no-default-features --features sqlcipher - done + - ./scripts/cargo_test.sh cache: cargo diff --git a/scripts/cargo_test.sh b/scripts/cargo_test.sh new file mode 100755 index 00000000..308be716 --- /dev/null +++ b/scripts/cargo_test.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cargo test --verbose --all +cargo test --features edn/serde_support --verbose --all +# We can't pick individual features out with `cargo test --all` (At the time of this writing, this +# works but does the wrong thing because of a bug in cargo, but its fix will be to disallow doing +# this all-together, see https://github.com/rust-lang/cargo/issues/5364 for more information). To +# work around this, we run individual tests for each subcrate individually. +for manifest in $(find . -type f -name Cargo.toml); do + cargo test --manifest-path $manifest --verbose --no-default-features --features sqlcipher +done