added dumb tests for parity and ethcore-rpc to include them in coverage reports, added TARGETS env variable to travis.yml
This commit is contained in:
parent
21de5562d7
commit
baec2909b6
20
.travis.yml
20
.travis.yml
@ -8,7 +8,7 @@ matrix:
|
|||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
env: FEATURES="--features ethcore/json-tests" KCOV_FEATURES=""
|
env: FEATURES="--features ethcore/json-tests" KCOV_FEATURES="" TARGETS="-p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity"
|
||||||
cache:
|
cache:
|
||||||
apt: true
|
apt: true
|
||||||
directories:
|
directories:
|
||||||
@ -28,22 +28,12 @@ before_script: |
|
|||||||
sudo apt-get install -y --force-yes librocksdb
|
sudo apt-get install -y --force-yes librocksdb
|
||||||
script:
|
script:
|
||||||
- cargo build --release --verbose ${FEATURES}
|
- cargo build --release --verbose ${FEATURES}
|
||||||
- cargo test --release -p ethash --verbose ${FEATURES}
|
- cargo test --release --verbose ${FEATURES} ${TARGETS}
|
||||||
- cargo test --release -p ethcore-util --verbose ${FEATURES}
|
- cargo bench --no-run ${FEATURES} ${TARGETS}
|
||||||
- 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 -p parity --verbose ${FEATURES}
|
|
||||||
- cargo bench --no-run ${FEATURES}
|
|
||||||
after_success: |
|
after_success: |
|
||||||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
|
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 ../.. &&
|
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 ${KCOV_FEATURES} &&
|
cargo test --no-run ${KCOV_FEATURES} ${TARGETS} &&
|
||||||
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-* &&
|
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore_util-* &&
|
||||||
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethash-* &&
|
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethash-* &&
|
||||||
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore-* &&
|
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore-* &&
|
||||||
@ -53,7 +43,7 @@ after_success: |
|
|||||||
[ $TRAVIS_BRANCH = master ] &&
|
[ $TRAVIS_BRANCH = master ] &&
|
||||||
[ $TRAVIS_PULL_REQUEST = false ] &&
|
[ $TRAVIS_PULL_REQUEST = false ] &&
|
||||||
[ $TRAVIS_RUST_VERSION = nightly ] &&
|
[ $TRAVIS_RUST_VERSION = nightly ] &&
|
||||||
cargo doc ${KCOV_FEATURES} --no-deps --verbose -p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity &&
|
cargo doc --no-deps --verbose ${KCOV_FEATURES} ${RARGETS} &&
|
||||||
echo '<meta http-equiv=refresh content=0;url=ethcore/index.html>' > target/doc/index.html &&
|
echo '<meta http-equiv=refresh content=0;url=ethcore/index.html>' > target/doc/index.html &&
|
||||||
pip install --user ghp-import &&
|
pip install --user ghp-import &&
|
||||||
/home/travis/.local/bin/ghp-import -n target/doc
|
/home/travis/.local/bin/ghp-import -n target/doc
|
||||||
|
@ -169,3 +169,7 @@ impl IoHandler<NetSyncMessage> for ClientIoHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Parity needs at least 1 test to generate coverage reports correctly.
|
||||||
|
#[test]
|
||||||
|
fn if_works() {
|
||||||
|
}
|
||||||
|
@ -42,3 +42,8 @@ impl HttpServer {
|
|||||||
server.start_async(addr)
|
server.start_async(addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Lib needs at least 1 test to generate coverage reports correctly.
|
||||||
|
#[test]
|
||||||
|
fn if_works() {
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user