Merge pull request #297 from ethcore/travis_fixes

benchmark fixes
This commit is contained in:
Gav Wood 2016-02-02 09:03:59 +01:00
commit e36c22e0b0
4 changed files with 19 additions and 21 deletions

View File

@ -8,7 +8,7 @@ matrix:
fast_finish: true
include:
- 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:
apt: true
directories:
@ -28,22 +28,12 @@ before_script: |
sudo apt-get install -y --force-yes librocksdb
script:
- 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 -p parity --verbose ${FEATURES}
- cargo bench --no-run ${FEATURES}
- cargo test --release --verbose ${FEATURES} ${TARGETS}
- cargo bench --no-run ${FEATURES} ${TARGETS}
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 ${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} &&
cargo test --no-run ${KCOV_FEATURES} ${TARGETS} &&
./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/ethcore-* &&
@ -53,7 +43,7 @@ after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
[ $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} ${TARGETS} &&
echo '<meta http-equiv=refresh content=0;url=ethcore/index.html>' > target/doc/index.html &&
pip install --user ghp-import &&
/home/travis/.local/bin/ghp-import -n target/doc

View File

@ -178,3 +178,7 @@ impl IoHandler<NetSyncMessage> for ClientIoHandler {
}
}
/// Parity needs at least 1 test to generate coverage reports correctly.
#[test]
fn if_works() {
}

View File

@ -42,3 +42,8 @@ impl HttpServer {
server.start_async(addr)
}
}
/// Lib needs at least 1 test to generate coverage reports correctly.
#[test]
fn if_works() {
}

View File

@ -3,7 +3,7 @@
//! ```bash
//! multirust run nightly cargo bench
//! ```
/*
#![feature(test)]
extern crate test;
@ -63,9 +63,9 @@ fn bench_stream_nested_empty_lists(b: &mut Bencher) {
b.iter(|| {
// [ [], [[]], [ [], [[]] ] ]
let mut stream = RlpStream::new_list(3);
stream.append_list(0);
stream.append_list(1).append_list(0);
stream.append_list(2).append_list(0).append_list(1).append_list(0);
stream.begin_list(0);
stream.begin_list(1).begin_list(0);
stream.begin_list(2).begin_list(0).begin_list(1).begin_list(0);
let _ = stream.out();
});
}
@ -89,9 +89,8 @@ fn bench_stream_1000_empty_lists(b: &mut Bencher) {
b.iter(|| {
let mut stream = RlpStream::new_list(1000);
for _ in 0..1000 {
stream.append_list(0);
stream.begin_list(0);
}
let _ = stream.out();
});
}
*/