openethereum/test.sh
Pierre Krieger ac3de4c5fc Parity as a library (#8412)
* Parity as a library

* Fix concerns

* Allow using a null on_client_restart_cb

* Fix more concerns

* Test the C library in test.sh

* Reduce CMake version to 3.5

* Move the clib test before cargo test

* Add println in test
2018-05-09 08:47:21 +02:00

58 lines
980 B
Bash
Executable File

#!/bin/sh
# Running Parity Full Test Suite
FEATURES="json-tests"
OPTIONS="--release"
VALIDATE=1
case $1 in
--no-json)
FEATURES="ipc"
shift # past argument=value
;;
--no-release)
OPTIONS=""
shift
;;
--no-validate)
VALIDATE=0
shift
;;
--no-run)
OPTIONS="--no-run"
shift
;;
*)
# unknown option
;;
esac
set -e
if [ "$VALIDATE" -eq "1" ]; then
# Validate --no-default-features build
echo "________Validate build________"
cargo check --no-default-features
# Validate chainspecs
echo "________Validate chainspecs________"
./scripts/validate_chainspecs.sh
fi
# Running the C example
echo "________Running the C example________"
cd parity-clib-example && \
mkdir -p build && \
cd build && \
cmake .. && \
make && \
./parity-example && \
cd .. && \
rm -rf build && \
cd ..
# Running tests
echo "________Running Parity Full Test Suite________"
cargo test -j 8 $OPTIONS --features "$FEATURES" --all $1