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
|
|
|
|
2018-09-25 12:24:40 +02:00
|
|
|
FEATURES="json-tests,ci-skip-issue"
|
2016-12-08 11:31:57 +01:00
|
|
|
OPTIONS="--release"
|
2018-04-02 13:12:52 +02:00
|
|
|
VALIDATE=1
|
2016-07-11 18:17:54 +02:00
|
|
|
|
|
|
|
case $1 in
|
2018-04-02 13:12:52 +02:00
|
|
|
--no-json)
|
2016-08-10 13:06:24 +02:00
|
|
|
FEATURES="ipc"
|
2016-07-11 18:17:54 +02:00
|
|
|
shift # past argument=value
|
|
|
|
;;
|
2018-04-02 13:12:52 +02:00
|
|
|
--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
|
|
|
|
|
2017-08-02 12:50:36 +02:00
|
|
|
set -e
|
|
|
|
|
2018-04-02 13:12:52 +02:00
|
|
|
if [ "$VALIDATE" -eq "1" ]; then
|
2018-03-28 21:04:08 +02:00
|
|
|
# Validate --no-default-features build
|
|
|
|
echo "________Validate build________"
|
2018-08-26 00:44:08 +02:00
|
|
|
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"
|
2018-03-28 21:04:08 +02:00
|
|
|
|
2017-11-20 11:02:48 +01:00
|
|
|
# Validate chainspecs
|
2018-03-28 21:04:08 +02:00
|
|
|
echo "________Validate chainspecs________"
|
2018-08-26 00:44:08 +02:00
|
|
|
time ./scripts/validate_chainspecs.sh
|
2018-04-02 13:12:52 +02:00
|
|
|
fi
|
|
|
|
|
2018-07-04 12:06:53 +02:00
|
|
|
# Running the C++ example
|
|
|
|
echo "________Running the C++ example________"
|
|
|
|
cd parity-clib-examples/cpp && \
|
2018-05-09 08:47:21 +02:00
|
|
|
mkdir -p build && \
|
|
|
|
cd build && \
|
|
|
|
cmake .. && \
|
2018-08-30 19:57:27 +02:00
|
|
|
make -j 8 && \
|
2018-05-09 08:47:21 +02:00
|
|
|
./parity-example && \
|
|
|
|
cd .. && \
|
|
|
|
rm -rf build && \
|
2018-07-04 12:06:53 +02:00
|
|
|
cd ../..
|
2018-05-09 08:47:21 +02:00
|
|
|
|
|
|
|
# Running tests
|
2018-03-28 21:04:08 +02:00
|
|
|
echo "________Running Parity Full Test Suite________"
|
2018-06-18 11:49:15 +02:00
|
|
|
git submodule update --init --recursive
|
2018-08-26 00:44:08 +02:00
|
|
|
time cargo test $OPTIONS --features "$FEATURES" --all $1 -- --test-threads 8
|