test.sh 1.18 KiB
Newer Older
Nikolay Volf's avatar
Nikolay Volf committed
#!/bin/sh
Liu-Cheng Xu's avatar
Liu-Cheng Xu committed
# Running Parity Full Test Suite
FEATURES="json-tests"
OPTIONS="--release"

case $1 in
    shift # past argument=value
    ;;
  --no-release)
    OPTIONS=""
    shift
    ;;
  --no-validate)
    VALIDATE=0
    shift
    ;;
  --no-run)
    OPTIONS="--no-run"
    shift
    ;;
  *)
    # unknown option
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"
# Validate chainspecs
echo "________Validate chainspecs________"
time ./scripts/validate_chainspecs.sh
# 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 && \

# Running tests
echo "________Running Parity Full Test Suite________"
git submodule update --init --recursive
time cargo test  $OPTIONS --features "$FEATURES" --all $1 -- --test-threads 8