From 691c4a740f90825e969e2a0e179c95df3e8a12d9 Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 31 Jan 2016 18:46:37 +0100 Subject: [PATCH 1/6] check if util coverage is working --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b75fd98e..4d9907c73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ matrix: cache: apt: true directories: + - target/debug/deps + - target/debug/build - target/release/deps - target/release/build addons: @@ -30,8 +32,10 @@ script: 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 ../.. && - ls target/release && - ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=${COVERALLS_TOKEN} --exclude-pattern=/.cargo --include-pattern=ethcore/src target/kcov target/release/deps/ethcore-* && + cargo test --no-run -p ethcore-util && + cargo test --no-run && + kcov --exclude-pattern /.cargo,/root/.multirust --include-pattern util/src target/kcov target/debug/deps/ethcore_util-* && + kcov --coveralls-id=${COVERALLS_TOKEN} --exclude-pattern /.cargo,/root/.multirust --include-pattern parity target/kcov target/debug/parity-* [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && [ $TRAVIS_RUST_VERSION = nightly ] && From 5f73059ee6fd483d900279bcc2c671f8bb19fe26 Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 31 Jan 2016 19:07:25 +0100 Subject: [PATCH 2/6] fixed path to kcov --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4d9907c73..477e8be7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,8 @@ after_success: | 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 && - kcov --exclude-pattern /.cargo,/root/.multirust --include-pattern util/src target/kcov target/debug/deps/ethcore_util-* && - kcov --coveralls-id=${COVERALLS_TOKEN} --exclude-pattern /.cargo,/root/.multirust --include-pattern parity target/kcov target/debug/parity-* + ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust --include-pattern util/src target/kcov target/debug/deps/ethcore_util-* && + ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=${COVERALLS_TOKEN} --exclude-pattern /.cargo,/root/.multirust --include-pattern parity target/kcov target/debug/parity-* [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && [ $TRAVIS_RUST_VERSION = nightly ] && From bd7ef539b611d795a3607f79caff31553173f155 Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 31 Jan 2016 19:32:05 +0100 Subject: [PATCH 3/6] fixed kcov source code paths --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 477e8be7a..e20372ed7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,9 +33,13 @@ 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 ethash && + cargo test --no-run -p ethcore && cargo test --no-run && - ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust --include-pattern util/src target/kcov target/debug/deps/ethcore_util-* && - ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=${COVERALLS_TOKEN} --exclude-pattern /.cargo,/root/.multirust --include-pattern parity target/kcov target/debug/parity-* + ./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-* && + ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/parity-* --coveralls-id=${COVERALLS_TOKEN} [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && [ $TRAVIS_RUST_VERSION = nightly ] && From 1a69b3861dd3657a919e0e3774391e052f410148 Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 31 Jan 2016 20:14:27 +0100 Subject: [PATCH 4/6] make json tests optional --- .travis.yml | 2 +- ethcore/Cargo.toml | 2 ++ ethcore/src/tests/test_common.rs | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e20372ed7..ebb88ee7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ after_success: | 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 ethash && - cargo test --no-run -p ethcore && + cargo test --no-run -p ethcore --no-default-features && cargo test --no-run && ./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-* && diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index ef8111272..c4eff8d05 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -25,6 +25,8 @@ crossbeam = "0.1.5" lazy_static = "0.1" [features] +default = ["json-tests"] jit = ["evmjit"] evm_debug = [] +json-tests = [] test-heavy = [] diff --git a/ethcore/src/tests/test_common.rs b/ethcore/src/tests/test_common.rs index 87e7b979e..fd88ae96a 100644 --- a/ethcore/src/tests/test_common.rs +++ b/ethcore/src/tests/test_common.rs @@ -12,6 +12,7 @@ macro_rules! declare_test { #[ignore] #[test] #[allow(non_snake_case)] + #[cfg(feature="json-tests")] fn $id() { test!($name); } @@ -20,6 +21,7 @@ macro_rules! declare_test { #[cfg(feature = "test-heavy")] #[test] #[allow(non_snake_case)] + #[cfg(feature="json-tests")] fn $id() { test!($name); } @@ -27,6 +29,7 @@ macro_rules! declare_test { ($id: ident, $name: expr) => { #[test] #[allow(non_snake_case)] + #[cfg(feature="json-tests")] fn $id() { test!($name); } From f07b514a170bef89ca4e2604672355870016c168 Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 31 Jan 2016 20:38:58 +0100 Subject: [PATCH 5/6] disable json tests for coverage --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ebb88ee7d..553b64586 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,12 +33,12 @@ 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 ethash && - cargo test --no-run -p ethcore --no-default-features && - cargo test --no-run && ./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 && ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/parity-* --coveralls-id=${COVERALLS_TOKEN} [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && From e3ce813425dccb6ec0cc629407aa8c4fb5bb7a51 Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 31 Jan 2016 20:41:41 +0100 Subject: [PATCH 6/6] fixed kcov params order --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 553b64586..d2bfdd0db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ after_success: | 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 && - ./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/parity-* --coveralls-id=${COVERALLS_TOKEN} + ./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 ] &&