openethereum/test.sh
André Silva b457f46c81 ethash: implement Progpow (#9762)
* ethash: initial implementation of progpow

* progpow: use wrapping arithmetic

* progpow: cleanup comments

* progpow: fix keccak_f800

* progpow: reorder definitions

* progpow: general fixing

* progpow: add basic tests from geth

* progpow: generate c_dag and add test

* progpow: fix progpow_init and progpow_loop

* progpow: fix and add new test

* progpow: tabify

* progpow: add shared testvectors from geth and aleth

* progpow: add benchmarks

* progpow: don't read bytes from dag

* ethash: use criterion for progpow benchmarks

* progpow: dont borrow hash on fnv1a_hash

* progpow: don't borrow operand on progpow merge

* progpow: hardcode dag lookup function

we only support light verification anyway

* progpow: read double words directly from the dag

* progpow: inline some small functions

* progpow: remove some bounds checking from the main loop

* progpow: remove unreachable match cases

* progpow: remove bounds check in keccak_f800_round

* progpow: fix ptr::swap

* progpow: force loop unroll in keccak_f800_round

* progpow: remove unnecessary branching in progpow_loop

* progpow: force loop unroll in fill_mix

* progpow: silence unused warning

* progpow: dont run last keccak_f800_round out of the loop

rustc generates the same assembly, it unrolls the loop

* progpow: fix output of keccak_f800_short

* ethcore: support progpow in ethash engine

* ethash: fix typo

* ethcore, ethash: fix tests

* json: fix ethash spec tests

* ethash: update quick_get_difficulty for progpow

* ethash: drop light cache on progpow transition block

* ethash: fix quick_get_difficulty tests

* progpow: update to spec v0.9.0

* progpow: update to spec v0.9.1

* progpow: update to spec v0.9.2

* ethash: rename progpow benchmarks

* fix Cargo.lock bad merge

* ethash: only export modules for benchmarks

* ethash: progpow: remove unsafe unchecked indexing

* ethash: create enum for pow algorithm

* ethash: box the progpow cdag

* ethash: skip slow progpow test vectors on ci

* ethash: don't skip progpow test vectors

they don't take too long when running in release mode which is the case
for CI.

* ethash: progpow: update copyright date

Co-Authored-By: andresilva <andre.beat@gmail.com>

* ethcore: remove verification of ci-skip-tests on non-test builds
2019-02-20 10:05:11 +01:00

80 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
# Running Parity Full Test Suite
echo "________Running test.sh________"
FEATURES="json-tests,ci-skip-tests"
OPTIONS="--release"
VALIDATE=1
THREADS=8
set -e
validate () {
if [ "$VALIDATE" -eq "1" ]
then
echo "________Validate build________"
time cargo check $@ --locked --no-default-features
time cargo check $@ --locked --manifest-path util/io/Cargo.toml --no-default-features
time cargo check $@ --locked --manifest-path util/io/Cargo.toml --features "mio"
# Validate chainspecs
echo "________Validate chainspecs________"
time ./scripts/validate_chainspecs.sh
else
echo "# not validating due to \$VALIDATE!=1"
fi
}
cpp_test () {
case $CARGO_TARGET in
(x86_64-unknown-linux-gnu)
# Running the C++ example
echo "________Running the C++ example________"
DIR=parity-clib/examples/cpp/build
mkdir -p $DIR
cd $DIR
cmake ..
make -j $THREADS
# Note: we don't try to run the example because it tries to sync Kovan, and we don't want
# that to happen on CI
cd -
rm -rf $DIR
;;
(*)
echo "________Skipping the C++ example________"
;;
esac
}
cargo_test () {
echo "________Running Parity Full Test Suite________"
git submodule update --init --recursive
time cargo test $OPTIONS --features "$FEATURES" --locked --all $@ -- --test-threads $THREADS
}
if [ "$CARGO_TARGET" ]
then
validate --target $CARGO_TARGET
else
validate
fi
test "${RUN_TESTS}" = "all" && cpp_test
if [ "$CARGO_TARGET" ]
then
case "${RUN_TESTS}" in
(cargo|all)
cargo_test --target $CARGO_TARGET $@
;;
('')
cargo_test --no-run --target $CARGO_TARGET $@
;;
esac
else
cargo_test $@
fi