Move test to script

This commit is contained in:
Emily Toop 2018-07-19 15:09:59 +01:00
parent 70501eb720
commit 92f7a527f0
2 changed files with 15 additions and 39 deletions

View file

@ -11,16 +11,7 @@ matrix:
- brew install sqlcipher --with-fts - brew install sqlcipher --with-fts
rust: 1.25.0 # Must align with `build/version.rs`. rust: 1.25.0 # Must align with `build/version.rs`.
script: script:
- cargo test --verbose --all - ./scripts/cargo_test.sh
- 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
after_success: after_success:
- | - |
if [[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then if [[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then
@ -38,16 +29,7 @@ matrix:
- brew install sqlcipher --with-fts - brew install sqlcipher --with-fts
rust: stable rust: stable
script: script:
- cargo test --verbose --all - ./scripts/cargo_test.sh
- 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
cache: cargo cache: cargo
- language: rust - language: rust
# We use OSX so that we can get a reasonably up to date version of SQLCipher. # 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 - brew install sqlcipher --with-fts
rust: beta rust: beta
script: script:
- cargo test --verbose --all - ./scripts/cargo_test.sh
# 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
cache: cargo cache: cargo
- language: rust - language: rust
# We use OSX so that we can get a reasonably up to date version of SQLCipher. # 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 - brew install sqlcipher --with-fts
rust: nightly rust: nightly
script: script:
- cargo test --verbose --all - ./scripts/cargo_test.sh
- 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
cache: cargo cache: cargo

11
scripts/cargo_test.sh Executable file
View file

@ -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