openethereum/test.sh

60 lines
1.2 KiB
Bash
Raw Normal View History

2016-02-16 11:12:29 +01:00
#!/bin/sh
2017-09-12 09:15:37 +02:00
# Running Parity Full Test Suite
2016-02-16 11:12:29 +01:00
2016-10-18 16:36:43 +02:00
FEATURES="json-tests"
OPTIONS="--release"
VALIDATE=1
2016-07-11 18:17:54 +02:00
case $1 in
--no-json)
FEATURES="ipc"
2016-07-11 18:17:54 +02:00
shift # past argument=value
;;
--no-release)
OPTIONS=""
shift
;;
--no-validate)
VALIDATE=0
shift
;;
--no-run)
OPTIONS="--no-run"
shift
;;
*)
# unknown option
2016-07-11 18:17:54 +02:00
;;
esac
set -e
if [ "$VALIDATE" -eq "1" ]; then
# Validate --no-default-features build
echo "________Validate build________"
time cargo check --no-default-features
time cargo check --manifest-path util/io/Cargo.toml --no-default-features
time cargo check --manifest-path util/io/Cargo.toml --features "mio"
2017-11-20 11:02:48 +01:00
# Validate chainspecs
echo "________Validate chainspecs________"
time ./scripts/validate_chainspecs.sh
fi
# Running the C++ example
echo "________Running the C++ example________"
cd parity-clib-examples/cpp && \
mkdir -p build && \
cd build && \
cmake .. && \
make -j 8 && \
./parity-example && \
cd .. && \
rm -rf build && \
cd ../..
# Running tests
echo "________Running Parity Full Test Suite________"
git submodule update --init --recursive
time cargo test $OPTIONS --features "$FEATURES" --all $1 -- --test-threads 8