From 09ebc924a613d3cc2888e9dda2e070a82bf9c994 Mon Sep 17 00:00:00 2001 From: debris Date: Mon, 1 Feb 2016 16:03:43 +0100 Subject: [PATCH] json tests are not run in default configuration, faster travis build, fixed coverage for ethcore-rpc and ethash --- .travis.yml | 28 ++++++++++++++++------------ Cargo.toml | 1 + ethcore/Cargo.toml | 1 - 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 14e71fa43..3b1e07eab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,8 @@ matrix: fast_finish: true include: - rust: nightly - env: FEATURES="--features rpc" + env: FEATURES="--features ethcore/json-tests" + env: KCOV_FEATURES="" cache: apt: true directories: @@ -27,30 +28,33 @@ before_script: | sudo apt-get update && sudo apt-get install -y --force-yes librocksdb script: -- cargo build --release --verbose -- cargo test --release -p ethash --verbose -- cargo test --release -p ethcore-util --verbose -- cargo test --release -p ethcore --verbose +- cargo build --release --verbose ${FEATURES} +- cargo test --release -p ethash --verbose ${FEATURES} +- cargo test --release -p ethcore-util --verbose ${FEATURES} +- cargo test --release -p ethcore --verbose ${FEATURES} +- cargo test --release -p ethsync --verbose ${FEATURES} - cargo test --release -p ethcore-rpc --verbose ${FEATURES} -- cargo test --release --verbose ${FEATURES} +- cargo test --release -p parity --verbose ${FEATURES} - cargo bench --no-run ${FEATURES} after_success: | wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make && make install DESTDIR=../tmp && cd ../.. && - cargo test --no-run -p ethcore-util && + cargo test --no-run -p ethcore-util ${KCOV_FEATURES} && + cargo test --no-run -p ethash ${KCOV_FEATURES} && + cargo test --no-run -p ethcore ${KCOV_FEATURES} && + cargo test --no-run -p ethsync ${KCOV_FEATURES} && + cargo test --no-run -p ethcore-rpc ${KCOV_FEATURES} && + cargo test --no-run -p parity ${KCOV_FEATURES} && ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore_util-* && - cargo test --no-run -p ethash && ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethash-* && - cargo test --no-run -p ethcore --no-default-features && ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore-* && - cargo test --no-run -p ethcore-rpc ${FEATURES} && + ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethsync-* && ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore_rpc-* && - cargo test --no-run ${FEATURES} && ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=${COVERALLS_TOKEN} --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/parity-* && [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && [ $TRAVIS_RUST_VERSION = nightly ] && - cargo doc ${FEATURES} --no-deps --verbose -p ethcore -p ethcore-util -p ethcore-rpc -p parity -p ethash -p ethsync && + cargo doc ${KCOV_FEATURES} --no-deps --verbose -p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity && echo '' > target/doc/index.html && pip install --user ghp-import && /home/travis/.local/bin/ghp-import -n target/doc diff --git a/Cargo.toml b/Cargo.toml index 3b45bd162..6766a5b2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ ethsync = { path = "sync" } ethcore-rpc = { path = "rpc", optional = true } [features] +default = ["rpc"] rpc = ["ethcore-rpc"] [[bin]] diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 35fa5df81..2df744686 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -25,7 +25,6 @@ crossbeam = "0.1.5" lazy_static = "0.1" [features] -default = ["json-tests"] jit = ["evmjit"] evm-debug = [] json-tests = []