From 89f73ea686cf28ff44e066a5c341bf318811e8e5 Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Sun, 18 Aug 2019 12:26:52 -0400 Subject: [PATCH] Add a test for testing as a dependency --- .travis.yml | 7 +++++-- contrib/test.sh | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 07bcd10c..9bfabdeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: rust +cache: cargo addons: apt: @@ -17,11 +18,13 @@ addons: matrix: include: - rust: stable - env: DO_FUZZ=true DO_COV=true + env: DO_FUZZ=true DO_COV=true AS_DEPENDENCY=true - rust: beta + env: AS_DEPENDENCY=true - rust: nightly - env: DO_BENCH=true + env: DO_BENCH=true AS_DEPENDENCY=true - rust: 1.22.0 + env: AS_DEPENDENCY=true script: - ./contrib/test.sh diff --git a/contrib/test.sh b/contrib/test.sh index ba2b5b94..7c5ed1e7 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -38,3 +38,12 @@ if [ "$DO_BENCH" = true ] then cargo bench --features unstable fi + +# Use as dependency if told to +if [ -n "$AS_DEPENDENCY" ] +then + cargo new dep_test + cd dep_test + echo 'bitcoin = { path = "..", features = ["use-serde"] }' >> Cargo.toml + cargo test --verbose +fi